umber-kernel/kernel/events
Breno Leitao 4ce27e86d6 uprobes: Fix incorrect lockdep condition in filter_chain()
[ Upstream commit a56a38fd9196fc89401e498d70b7aa9c9679fa6e ]

The list_for_each_entry_rcu() in filter_chain() uses
rcu_read_lock_trace_held() as the lockdep condition, but the function
holds consumer_rwsem, not the RCU trace lock.

This gives me the following output when running with some locking debug
option enabled:

  kernel/events/uprobes.c:1141 RCU-list traversed in non-reader section!!
    filter_chain
    register_for_each_vma
    uprobe_unregister_nosync
    __probe_event_disable

Remove the incorrect lockdep condition since the rwsem provides
sufficient protection for the list traversal.

Fixes: cc01bd044e ("uprobes: travers uprobe's consumer list locklessly under SRCU protection")
Signed-off-by: Breno Leitao <leitao@debian.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/20260128-uprobe_rcu-v2-1-994ea6d32730@debian.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
2026-03-04 07:21:21 -05:00
..
Makefile
callchain.c perf: sched: Fix perf crash with new is_user_task() helper 2026-02-06 16:57:37 +01:00
core.c perf/core: Fix slow perf_event_task_exit() with LBR callstacks 2026-03-04 07:19:41 -05:00
hw_breakpoint.c
hw_breakpoint_test.c
internal.h perf: Convert mmap() refcounts to refcount_t 2025-08-15 13:13:02 +02:00
ring_buffer.c perf: Convert mmap() refcounts to refcount_t 2025-08-15 13:13:02 +02:00
uprobes.c uprobes: Fix incorrect lockdep condition in filter_chain() 2026-03-04 07:21:21 -05:00