aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/progs/task_storage_nodeadlock.c
diff options
context:
space:
mode:
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>2024-11-19 17:18:19 +0100
committerAlexei Starovoitov <ast@kernel.org>2024-11-26 08:55:01 -0800
commit6b64128a74ebcacc5a0de5a74834e3b9f47a354c (patch)
treeac7247b2e89a8bfd666de0226fee9b2d2c7f152f /tools/testing/selftests/bpf/progs/task_storage_nodeadlock.c
parentbpftool: fix potential NULL pointer dereferencing in prog_dump() (diff)
downloadlinux-6b64128a74ebcacc5a0de5a74834e3b9f47a354c.tar.gz
linux-6b64128a74ebcacc5a0de5a74834e3b9f47a354c.zip
selftests/bpf: Check for PREEMPTION instead of PREEMPT
CONFIG_PREEMPT is a preemtion model the so called "Low-Latency Desktop". A different preemption model is PREEMPT_RT the so called "Real-Time". Both implement preemption in kernel and set CONFIG_PREEMPTION. There is also the so called "LAZY PREEMPT" which the "Scheduler controlled preemption model". Here we have also preemption in the kernel the rules are slightly different. Therefore the testsuite should not check for CONFIG_PREEMPT (as one model) but for CONFIG_PREEMPTION to figure out if preemption in the kernel is possible. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Link: https://lore.kernel.org/r/20241119161819.qvEcs-n_@linutronix.de Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/progs/task_storage_nodeadlock.c')
-rw-r--r--tools/testing/selftests/bpf/progs/task_storage_nodeadlock.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/testing/selftests/bpf/progs/task_storage_nodeadlock.c b/tools/testing/selftests/bpf/progs/task_storage_nodeadlock.c
index ea2dbb80f7b3..986829aaf73a 100644
--- a/tools/testing/selftests/bpf/progs/task_storage_nodeadlock.c
+++ b/tools/testing/selftests/bpf/progs/task_storage_nodeadlock.c
@@ -10,7 +10,7 @@ char _license[] SEC("license") = "GPL";
#define EBUSY 16
#endif
-extern bool CONFIG_PREEMPT __kconfig __weak;
+extern bool CONFIG_PREEMPTION __kconfig __weak;
int nr_get_errs = 0;
int nr_del_errs = 0;
@@ -29,7 +29,7 @@ int BPF_PROG(socket_post_create, struct socket *sock, int family, int type,
int ret, zero = 0;
int *value;
- if (!CONFIG_PREEMPT)
+ if (!CONFIG_PREEMPTION)
return 0;
task = bpf_get_current_task_btf();