bpf: Remove recursion prevention from rcu free callback
authorThomas Gleixner <tglx@linutronix.de>
Mon, 24 Feb 2020 14:01:39 +0000 (15:01 +0100)
committerCosmin Tanislav <demonsingur@gmail.com>
Thu, 16 May 2024 07:58:23 +0000 (10:58 +0300)
commit3dd509f37ef9491da5cfc6abd4c84e840142cc30
tree4979dd0a663c292e2d326e7c09c0bc601af4d5c0
parent57138efd25950dd617435efd2b627423d5366aac
bpf: Remove recursion prevention from rcu free callback

[ Upstream commit 8a37963c7ac9ecb7f86f8ebda020e3f8d6d7b8a0 ]

If an element is freed via RCU then recursion into BPF instrumentation
functions is not a concern. The element is already detached from the map
and the RCU callback does not hold any locks on which a kprobe, perf event
or tracepoint attached BPF program could deadlock.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20200224145643.259118710@linutronix.de
Signed-off-by: Sasha Levin <sashal@kernel.org>
kernel/bpf/hashtab.c