Thread (4 messages) 4 messages, 3 authors, 2026-01-28

Re: [PATCH] uprobes: fix incorrect lockdep condition in filter_chain()

flat view

From: Oleg Nesterov <oleg@redhat.com>
Date: 2026-01-28 13:51:05
Also in: linux-perf-users, lkml, stable

On 01/28, Breno Leitao wrote:
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.
I hope Andrii will recheck, but looks obviously correct to me.
Fixes: 87195a1ee332a ("uprobes: switch to RCU Tasks Trace flavor for better performance")
This commit just change the __list_check_rcu() condition...

Perhaps
Fixes: cc01bd044e6a ("uprobes: travers uprobe's consumer list locklessly under SRCU protection")

makes more sense?

Acked-by: Oleg Nesterov <oleg@redhat.com>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help