]> git.ipfire.org Git - thirdparty/linux.git/commit
bpf: Simplify bpf_timer_cancel()
authorMykyta Yatsenko <yatsenko@meta.com>
Tue, 20 Jan 2026 15:59:13 +0000 (15:59 +0000)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 21 Jan 2026 02:12:19 +0000 (18:12 -0800)
commit83c9030cdc45e0518d71065c25201a24eafc9818
tree0afd43321adf38d2a220f6b902f06eab2b39c62e
parent8bb1e32b3fac1becb4c1c8079d720784b8e33e34
bpf: Simplify bpf_timer_cancel()

Remove lock from the bpf_timer_cancel() helper. The lock does not
protect from concurrent modification of the bpf_async_cb data fields as
those are modified in the callback without locking.

Use guard(rcu)() instead of pair of explicit lock()/unlock().

Acked-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Mykyta Yatsenko <yatsenko@meta.com>
Link: https://lore.kernel.org/r/20260120-timer_nolock-v6-4-670ffdd787b4@meta.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
kernel/bpf/helpers.c