diff options
| author | Sebastian Andrzej Siewior <[email protected]> | 2023-08-30 08:04:04 +0000 |
|---|---|---|
| committer | Daniel Borkmann <[email protected]> | 2023-09-06 08:39:31 +0000 |
| commit | 7645629f7dc88cd777f98970134bf1a54c8d77e3 (patch) | |
| tree | dde5b29cdd03e8b33e1e902e4b7d1f538786d17b /tools/perf/scripts/python/event_analyzing_sample.py | |
| parent | bpf, sockmap: Fix skb refcnt race after locking changes (diff) | |
| download | kernel-7645629f7dc88cd777f98970134bf1a54c8d77e3.tar.gz kernel-7645629f7dc88cd777f98970134bf1a54c8d77e3.zip | |
bpf: Invoke __bpf_prog_exit_sleepable_recur() on recursion in kern_sys_bpf().
If __bpf_prog_enter_sleepable_recur() detects recursion then it returns
0 without undoing rcu_read_lock_trace(), migrate_disable() or
decrementing the recursion counter. This is fine in the JIT case because
the JIT code will jump in the 0 case to the end and invoke the matching
exit trampoline (__bpf_prog_exit_sleepable_recur()).
This is not the case in kern_sys_bpf() which returns directly to the
caller with an error code.
Add __bpf_prog_exit_sleepable_recur() as clean up in the recursion case.
Fixes: b1d18a7574d0d ("bpf: Extend sys_bpf commands for bpf_syscall programs.")
Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Acked-by: Jiri Olsa <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/event_analyzing_sample.py')
0 files changed, 0 insertions, 0 deletions
