summaryrefslogtreecommitdiff
path: root/lib/zstd/common/debug.h
diff options
context:
space:
mode:
authorAndrii Nakryiko <andrii@kernel.org>2025-02-26 01:32:14 +0300
committerIngo Molnar <mingo@kernel.org>2025-02-26 01:36:19 +0300
commitf8c857238a392f21d5726d07966f6061007c8d4f (patch)
tree43e19533869aa311aaaa0248a93b6da6b7169c35 /lib/zstd/common/debug.h
parent68a9b0e313302451468c0b0eda53c383fa51a8f4 (diff)
downloadlinux-f8c857238a392f21d5726d07966f6061007c8d4f.tar.xz
uprobes: Remove too strict lockdep_assert() condition in hprobe_expire()
hprobe_expire() is used to atomically switch pending uretprobe instance (struct return_instance) from being SRCU protected to be refcounted. This can be done from background timer thread, or synchronously within current thread when task is forked. In the former case, return_instance has to be protected through RCU read lock, and that's what hprobe_expire() used to check with lockdep_assert(rcu_read_lock_held()). But in the latter case (hprobe_expire() called from dup_utask()) there is no RCU lock being held, and it's both unnecessary and incovenient. Inconvenient due to the intervening memory allocations inside dup_return_instance()'s loop. Unnecessary because dup_utask() is called synchronously in current thread, and no uretprobe can run at that point, so return_instance can't be freed either. So drop rcu_read_lock_held() condition, and expand corresponding comment to explain necessary lifetime guarantees. lockdep_assert()-detected issue is a false positive. Fixes: dd1a7567784e ("uprobes: SRCU-protect uretprobe lifetime (with timeout)") Reported-by: Breno Leitao <leitao@debian.org> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Link: https://lore.kernel.org/r/20250225223214.2970740-1-andrii@kernel.org
Diffstat (limited to 'lib/zstd/common/debug.h')
0 files changed, 0 insertions, 0 deletions