diff options
| author | Alexei Starovoitov <ast@kernel.org> | 2026-02-03 21:51:47 -0800 |
|---|---|---|
| committer | Andrii Nakryiko <andrii@kernel.org> | 2026-02-04 13:12:50 -0800 |
| commit | 6e65cf81accf908d2480739b85dba4731048290d (patch) | |
| tree | aba1b31ab5eb9b3bef324d359ef8fd054bf6e2ef | |
| parent | 64873307e888505ccc45ef049dccdcfef42d2f54 (diff) | |
selftests/bpf: Strengthen timer_start_deadlock test
Strengthen timer_start_deadlock test and check for recursion now
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20260204055147.54960-5-alexei.starovoitov@gmail.com
| -rw-r--r-- | tools/testing/selftests/bpf/progs/timer_start_deadlock.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/tools/testing/selftests/bpf/progs/timer_start_deadlock.c b/tools/testing/selftests/bpf/progs/timer_start_deadlock.c index 368563747a46..019518ee18cd 100644 --- a/tools/testing/selftests/bpf/progs/timer_start_deadlock.c +++ b/tools/testing/selftests/bpf/progs/timer_start_deadlock.c @@ -31,7 +31,6 @@ SEC("tp_btf/hrtimer_cancel") int BPF_PROG(tp_hrtimer_cancel, struct hrtimer *hrtimer) { struct bpf_timer *timer; - static bool called = false; int key = 0; if (!in_timer_start) @@ -42,13 +41,9 @@ int BPF_PROG(tp_hrtimer_cancel, struct hrtimer *hrtimer) /* * Call bpf_timer_start() from the tracepoint within hrtimer logic - * on the same timer to make sure it doesn't deadlock, - * and do it once. + * on the same timer to make sure it doesn't deadlock. */ - if (!called) { - called = true; - bpf_timer_start(timer, 1000000000, 0); - } + bpf_timer_start(timer, 1000000000, 0); return 0; } |
