aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/progs/test_autoload.c
diff options
context:
space:
mode:
authorOleg Nesterov <[email protected]>2023-11-14 17:32:37 +0100
committerAlexei Starovoitov <[email protected]>2023-11-19 11:43:44 -0800
commit5a34f9dabd9aa567e2d37e1aa27a67f80acfaa1c (patch)
treec070c12042571603f0516ae4a95be695cb98dc00 /tools/testing/selftests/bpf/progs/test_autoload.c
parent2d1618054f25e11c44d189dbff4a60342a4cfb4b (diff)
bpf: bpf_iter_task_next: use __next_thread() rather than next_thread()
Lockless use of next_thread() should be avoided, kernel/bpf/task_iter.c is the last user and the usage is wrong. bpf_iter_task_next() can loop forever, "kit->pos == kit->task" can never happen if kit->pos execs. Change this code to use __next_thread(). With or without this change the usage of kit->pos/task and next_task() doesn't look nice, see the next patch. Signed-off-by: Oleg Nesterov <[email protected]> Acked-by: Yonghong Song <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/progs/test_autoload.c')
0 files changed, 0 insertions, 0 deletions