]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
bpf: Remove migrate_disable in kprobe_multi_link_prog_run
authorTao Chen <chen.dylane@linux.dev>
Thu, 14 Aug 2025 12:14:29 +0000 (20:14 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Oct 2025 09:56:26 +0000 (11:56 +0200)
commit1d7c0e3e2153c20d26088cbb4c96e704d54a770d
tree51ce9ad82f0c13929b28f231f66f7182c0324966
parenta95f5f187cb15c570c9e1a22b6289fd8c2ad670c
bpf: Remove migrate_disable in kprobe_multi_link_prog_run

[ Upstream commit abdaf49be5424db74e19d167c10d7dad79a0efc2 ]

Graph tracer framework ensures we won't migrate, kprobe_multi_link_prog_run
called all the way from graph tracer, which disables preemption in
function_graph_enter_regs, as Jiri and Yonghong suggested, there is no
need to use migrate_disable. As a result, some overhead may will be reduced.
And add cant_sleep check for __this_cpu_inc_return.

Fixes: 0dcac2725406 ("bpf: Add multi kprobe link")
Signed-off-by: Tao Chen <chen.dylane@linux.dev>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20250814121430.2347454-1-chen.dylane@linux.dev
Signed-off-by: Sasha Levin <sashal@kernel.org>
kernel/trace/bpf_trace.c