selftests/bpf: Test deadlock from recursive bpf_task_storage_[get|delete]
authorSong Liu <songliubraving@fb.com>
Thu, 25 Feb 2021 23:43:17 +0000 (15:43 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 26 Feb 2021 19:51:48 +0000 (11:51 -0800)
commitc540957a4d1d13934e93e53ce3056ac4108ffc29
tree2a85e2ef94158ca0b3042c6644d937df4eefef87
parent1f87dcf116adedd6b9f47258d4fdf4fa9ce74002
selftests/bpf: Test deadlock from recursive bpf_task_storage_[get|delete]

Add a test with recursive bpf_task_storage_[get|delete] from fentry
programs on bpf_local_storage_lookup and bpf_local_storage_update. Without
proper deadlock prevent mechanism, this test would cause deadlock.

Signed-off-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20210225234319.336131-5-songliubraving@fb.com
tools/testing/selftests/bpf/prog_tests/task_local_storage.c
tools/testing/selftests/bpf/progs/task_ls_recursion.c [new file with mode: 0644]