Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bpf, perf: delay release of BPF prog after grace period
Commit dead9f2 ("perf: Fix race in BPF program unregister") moved destruction of BPF program from free_event_rcu() callback to __free_event(), which is problematic if used with tail calls: if prog A is attached as trace event directly, but at the same time present in a tail call map used by another trace event program elsewhere, then we need to delay destruction via RCU grace period since it can still be in use by the program doing the tail call (the prog first needs to be dropped from the tail call map, then trace event with prog A attached destroyed, so we get immediate destruction). Fixes: dead9f2 ("perf: Fix race in BPF program unregister") Signed-off-by: Daniel Borkmann <[email protected]> Acked-by: Alexei Starovoitov <[email protected]> Cc: Jann Horn <[email protected]> Signed-off-by: David S. Miller <[email protected]>
- Loading branch information