selftests/bpf: Fix rcu_read_lock test with new MEM_RCU semantics
authorYonghong Song <yhs@fb.com>
Sat, 3 Dec 2022 18:46:07 +0000 (10:46 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Sun, 4 Dec 2022 20:52:40 +0000 (12:52 -0800)
commit8723ec22a31db3f400fce440c235ada0fff95657
tree1a76120b9fa8dcff791817cb5e0c689146728946
parentfca1aa75518c03b04c3c249e9a9134faf9ca18c5
selftests/bpf: Fix rcu_read_lock test with new MEM_RCU semantics

Add MEM_RCU pointer null checking for related tests. Also
modified task_acquire test so it takes a rcu ptr 'ptr' where
'ptr = rcu_ptr->rcu_field'.

Signed-off-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/r/20221203184607.478314-1-yhs@fb.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/progs/rcu_read_lock.c