aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/sctop.py
diff options
context:
space:
mode:
authorThomas Gleixner <[email protected]>2020-02-24 15:01:49 +0100
committerAlexei Starovoitov <[email protected]>2020-02-24 16:20:10 -0800
commitb6e5dae15a61b0cc9219799926813baad0b58967 (patch)
tree54d5a5804fe457956725474e079ec989054cba3c /tools/perf/scripts/python/sctop.py
parent085fee1a72a9fba101a4a68a2c02fa8bd2b6f913 (diff)
bpf: Replace open coded recursion prevention in sys_bpf()
The required protection is that the caller cannot be migrated to a different CPU as these functions end up in places which take either a hash bucket lock or might trigger a kprobe inside the memory allocator. Both scenarios can lead to deadlocks. The deadlock prevention is per CPU by incrementing a per CPU variable which temporarily blocks the invocation of BPF programs from perf and kprobes. Replace the open coded preempt_[dis|en]able and __this_cpu_[inc|dec] pairs with the new helper functions. These functions are already prepared to make BPF work on PREEMPT_RT enabled kernels. No functional change for !RT kernels. Signed-off-by: Thomas Gleixner <[email protected]> Signed-off-by: Alexei Starovoitov <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/sctop.py')
0 files changed, 0 insertions, 0 deletions