summaryrefslogtreecommitdiffstats
path: root/kernel/bpf
diff options
context:
space:
mode:
authorAndrii Nakryiko <andrii@kernel.org>2024-03-27 22:24:25 -0700
committerAlexei Starovoitov <ast@kernel.org>2024-03-28 18:47:45 -0700
commite9c856cabefb71d47b2eeb197f72c9c88e9b45b0 (patch)
tree29cf5df350ae5d3441fc6dcd010bc06e21509659 /kernel/bpf
parent037965402a010898d34f4e35327d22c0a95cd51f (diff)
downloadlinux-e9c856cabefb71d47b2eeb197f72c9c88e9b45b0.tar.gz
linux-e9c856cabefb71d47b2eeb197f72c9c88e9b45b0.tar.bz2
linux-e9c856cabefb71d47b2eeb197f72c9c88e9b45b0.zip
bpf: put uprobe link's path and task in release callback
There is no need to delay putting either path or task to deallocation step. It can be done right after bpf_uprobe_unregister. Between release and dealloc, there could be still some running BPF programs, but they don't access either task or path, only data in link->uprobes, so it is safe to do. On the other hand, doing path_put() in dealloc callback makes this dealloc sleepable because path_put() itself might sleep. Which is problematic due to the need to call uprobe's dealloc through call_rcu(), which is what is done in the next bug fix patch. So solve the problem by releasing these resources early. Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/r/20240328052426.3042617-1-andrii@kernel.org Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'kernel/bpf')
0 files changed, 0 insertions, 0 deletions