linux-stable/kernel/rcu
Paul E. McKenney 090eb578b9 rcuperf: Fix cleanup path for invalid perf_type strings
[ Upstream commit ad092c0277 ]

If the specified rcuperf.perf_type is not in the rcu_perf_init()
function's perf_ops[] array, rcuperf prints some console messages and
then invokes rcu_perf_cleanup() to set state so that a future torture
test can run.  However, rcu_perf_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_perf_cleanup(), thus avoiding
relying on an irrelevant cur_ops value.

Signed-off-by: Paul E. McKenney <paulmck@linux.ibm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-05-31 06:48:30 -07:00
..
Makefile rcutorture: Add RCU grace-period performance tests 2016-03-31 13:37:38 -07:00
rcu.h rcu: Narrow early boot window of illegal synchronous grace periods 2017-01-26 08:24:37 +01:00
rcuperf.c rcuperf: Fix cleanup path for invalid perf_type strings 2019-05-31 06:48:30 -07:00
rcutorture.c rcutorture: Fix cleanup path for invalid torture_type strings 2019-05-31 06:48:30 -07:00
srcu.c rcu: Add rcu_normal kernel parameter to suppress expediting 2015-12-04 12:26:53 -08:00
sync.c locking, rcu, cgroup: Avoid synchronize_sched() in __cgroup_procs_write() 2016-08-18 15:36:59 +02:00
tiny.c rcu: Remove cond_resched() from Tiny synchronize_sched() 2017-01-26 08:24:37 +01:00
tiny_plugin.h rcu: Narrow early boot window of illegal synchronous grace periods 2017-01-26 08:24:37 +01:00
tree.c rcu: Do RCU GP kthread self-wakeup from softirq and interrupt 2019-03-23 13:19:53 +01:00
tree.h rcu: Drive expedited grace periods from workqueue 2016-08-22 09:30:25 -07:00
tree_exp.h rcu: Narrow early boot window of illegal synchronous grace periods 2017-01-26 08:24:37 +01:00
tree_plugin.h rcu: Call touch_nmi_watchdog() while printing stall warnings 2018-05-30 07:50:50 +02:00
tree_trace.c rcu: Drive expedited grace periods from workqueue 2016-08-22 09:30:25 -07:00
update.c rcu: Narrow early boot window of illegal synchronous grace periods 2017-01-26 08:24:37 +01:00