summaryrefslogtreecommitdiff
path: root/lib/kfifo.c
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@kernel.org>2024-10-23 23:03:52 +0300
committerAndrii Nakryiko <andrii@kernel.org>2024-10-24 00:33:02 +0300
commit0ee288e69d033850bc87abe0f9cc3ada24763d7f (patch)
treed2f470cc01861ab6e1778255bdfdcec22c00517d /lib/kfifo.c
parent82bbe133312b37bbef29f96e56e177ebe240f700 (diff)
downloadlinux-0ee288e69d033850bc87abe0f9cc3ada24763d7f.tar.xz
bpf,perf: Fix perf_event_detach_bpf_prog error handling
Peter reported that perf_event_detach_bpf_prog might skip to release the bpf program for -ENOENT error from bpf_prog_array_copy. This can't happen because bpf program is stored in perf event and is detached and released only when perf event is freed. Let's drop the -ENOENT check and make sure the bpf program is released in any case. Fixes: 170a7e3ea070 ("bpf: bpf_prog_array_copy() should return -ENOENT if exclude_prog not found") Reported-by: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Jiri Olsa <jolsa@kernel.org> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20241023200352.3488610-1-jolsa@kernel.org Closes: https://lore.kernel.org/lkml/20241022111638.GC16066@noisy.programming.kicks-ass.net/
Diffstat (limited to 'lib/kfifo.c')
0 files changed, 0 insertions, 0 deletions