diff options
| author | Jiri Olsa <[email protected]> | 2024-10-23 20:03:52 +0000 |
|---|---|---|
| committer | Andrii Nakryiko <[email protected]> | 2024-10-23 21:33:02 +0000 |
| commit | 0ee288e69d033850bc87abe0f9cc3ada24763d7f (patch) | |
| tree | d2f470cc01861ab6e1778255bdfdcec22c00517d /tools/testing/selftests/bpf/prog_tests/tracing_struct.c | |
| parent | selftests/bpf: Add test for passing in uninit mtu_len (diff) | |
| download | kernel-0ee288e69d033850bc87abe0f9cc3ada24763d7f.tar.gz kernel-0ee288e69d033850bc87abe0f9cc3ada24763d7f.zip | |
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 <[email protected]>
Signed-off-by: Jiri Olsa <[email protected]>
Signed-off-by: Andrii Nakryiko <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Closes: https://lore.kernel.org/lkml/[email protected]/
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/tracing_struct.c')
0 files changed, 0 insertions, 0 deletions
