aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/progs/rcu_read_lock.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/testing/selftests/bpf/progs/rcu_read_lock.c')
-rw-r--r--tools/testing/selftests/bpf/progs/rcu_read_lock.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/progs/rcu_read_lock.c b/tools/testing/selftests/bpf/progs/rcu_read_lock.c
index cf06a34fcb02..125f908024d3 100644
--- a/tools/testing/selftests/bpf/progs/rcu_read_lock.c
+++ b/tools/testing/selftests/bpf/progs/rcu_read_lock.c
@@ -161,6 +161,11 @@ int task_acquire(void *ctx)
/* acquire a reference which can be used outside rcu read lock region */
gparent = bpf_task_acquire_not_zero(gparent);
if (!gparent)
+ /* Until we resolve the issues with using task->rcu_users, we
+ * expect bpf_task_acquire_not_zero() to return a NULL task.
+ * See the comment at the definition of
+ * bpf_task_acquire_not_zero() for more details.
+ */
goto out;
(void)bpf_task_storage_get(&map_a, gparent, 0, 0);