android_kernel_oneplus_msm8998/kernel/rcu
Paul E. McKenney 1909121a61 rcutorture: Fix cleanup path for invalid torture_type strings
[ Upstream commit b813afae7ab6a5e91b4e16cc567331d9c2ae1f04 ]

If the specified rcutorture.torture_type is not in the rcu_torture_init()
function's torture_ops[] array, rcutorture prints some console messages
and then invokes rcu_torture_cleanup() to set state so that a future
torture test can run.  However, rcu_torture_cleanup() also attempts to
end the test that didn't actually start, and in doing so relies on the
value of cur_ops, a value that is not particularly relevant in this case.
This can result in confusing output or even follow-on failures due to
attempts to use facilities that have not been properly initialized.

This commit therefore sets the value of cur_ops to NULL in this case
and inserts a check near the beginning of rcu_torture_cleanup(),
thus avoiding relying on an irrelevant cur_ops value.

Reported-by: kernel test robot <rong.a.chen@intel.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.ibm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-06-11 12:24:04 +02:00
..
Makefile rcu: Create rcu_sync infrastructure 2015-10-06 11:25:04 -07:00
rcu.h tiny_rcu: Directly force QS when call_rcu_[bh|sched]() on idle_task 2015-01-06 11:01:12 -08:00
rcutorture.c rcutorture: Fix cleanup path for invalid torture_type strings 2019-06-11 12:24:04 +02:00
srcu.c rcu: Move preemption disabling out of __srcu_read_lock() 2015-10-06 11:15:43 -07:00
sync.c rcu_sync: Cleanup the CONFIG_PROVE_RCU checks 2015-10-06 11:25:45 -07:00
tiny.c rcu: Use rcu_callback_t in call_rcu*() and friends 2015-10-06 11:08:05 -07:00
tiny_plugin.h rcu: Convert ACCESS_ONCE() to READ_ONCE() and WRITE_ONCE() 2015-05-27 12:56:15 -07:00
tree.c rcu: Do RCU GP kthread self-wakeup from softirq and interrupt 2019-03-23 08:44:39 +01:00
tree.h Merge branches 'fixes.2015.10.06a' and 'exp.2015.10.07a' into HEAD 2015-10-07 16:05:21 -07:00
tree_plugin.h rcu: Fix soft lockup for rcu_nocb_kthread 2016-12-08 07:15:24 +01:00
tree_trace.c Merge branches 'fixes.2015.10.06a' and 'exp.2015.10.07a' into HEAD 2015-10-07 16:05:21 -07:00
update.c rcu: Use rcu_callback_t in call_rcu*() and friends 2015-10-06 11:08:05 -07:00