From 5e92ab6295afc1c46500867c8911975b180561a1 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Wed, 7 Sep 2016 17:26:25 -0400 Subject: [PATCH] Fix: rcutorture should register thread using call_rcu From rcu-api.txt: `call_rcu` should be called from registered RCU read-side threads. For the QSBR flavor, the caller should be online. Signed-off-by: Mathieu Desnoyers --- tests/regression/rcutorture.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/regression/rcutorture.h b/tests/regression/rcutorture.h index f8548d8..6539a57 100644 --- a/tests/regression/rcutorture.h +++ b/tests/regression/rcutorture.h @@ -344,6 +344,9 @@ void *rcu_update_stress_test(void *arg) struct rcu_stress *p; struct rcu_head rh; + rcu_register_thread(); + rcu_thread_offline(); + while (goflag == GOFLAG_INIT) poll(NULL, 0, 1); while (goflag == GOFLAG_RUN) { @@ -380,6 +383,9 @@ void *rcu_update_stress_test(void *arg) } n_updates++; } + + rcu_thread_online(); + rcu_unregister_thread(); return NULL; } -- 2.34.1