aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/prog_tests/global_data_init.c
diff options
context:
space:
mode:
authorHou Tao <[email protected]>2022-09-01 06:19:36 +0000
committerMartin KaFai Lau <[email protected]>2022-09-01 19:16:18 +0000
commitc89e843a11f1075d27684f6b42256213e4592383 (patch)
tree22c31daa6100b62e1d048af31c9c813cdf072bf0 /tools/testing/selftests/bpf/prog_tests/global_data_init.c
parentbpf: Use this_cpu_{inc|dec|inc_return} for bpf_task_storage_busy (diff)
downloadkernel-c89e843a11f1075d27684f6b42256213e4592383.tar.gz
kernel-c89e843a11f1075d27684f6b42256213e4592383.zip
bpf: Use this_cpu_{inc_return|dec} for prog->active
Both __this_cpu_inc_return() and __this_cpu_dec() are not preemption safe and now migrate_disable() doesn't disable preemption, so the update of prog-active is not atomic and in theory under fully preemptible kernel recurisve prevention may do not work. Fixing by using the preemption-safe and IRQ-safe variants. Fixes: ca06f55b9002 ("bpf: Add per-program recursion prevention mechanism") Signed-off-by: Hou Tao <[email protected]> Acked-by: Alexei Starovoitov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin KaFai Lau <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/global_data_init.c')
0 files changed, 0 insertions, 0 deletions