aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/prog_tests/prog_array_init.c
diff options
context:
space:
mode:
authorHou Tao <[email protected]>2022-10-14 19:39:45 +0800
committerAlexei Starovoitov <[email protected]>2022-10-18 10:27:02 -0700
commitd39d1445d37747032e2b26732fed6fe25161cd36 (patch)
treec7d7ca9a9cd280148fea567c5d7036076c574b48 /tools/testing/selftests/bpf/prog_tests/prog_array_init.c
parent59be91e5e70a1aa91dfee8088b071f6d05c8a1a3 (diff)
bpf: Use rcu_trace_implies_rcu_gp() in local storage map
Local storage map is accessible for both sleepable and non-sleepable bpf program, and its memory is freed by using both call_rcu_tasks_trace() and kfree_rcu() to wait for both RCU-tasks-trace grace period and RCU grace period to pass. With the introduction of rcu_trace_implies_rcu_gp(), both bpf_selem_free_rcu() and bpf_local_storage_free_rcu() can check whether or not a normal RCU grace period has also passed after a RCU-tasks-trace grace period has passed. If it is true, it is safe to call kfree() directly. Signed-off-by: Hou Tao <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/prog_array_init.c')
0 files changed, 0 insertions, 0 deletions