linux-brain/kernel/rcu
Paul E. McKenney 824343eda8 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:47:33 -07:00
..
Kconfig rcu: Drive TASKS_RCU directly off of PREEMPT 2017-08-17 07:26:04 -07:00
Kconfig.debug rcu: Move RCU debug Kconfig options to kernel/rcu 2017-06-08 18:52:44 -07:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
rcu_segcblist.c rcu: Remove unused RCU list functions 2017-07-25 13:04:49 -07:00
rcu_segcblist.h rcu: Remove unused RCU list functions 2017-07-25 13:04:49 -07:00
rcu.h rcu: Move rcu.h to new trivial-function style 2017-08-17 07:26:06 -07:00
rcuperf.c rcuperf: Fix cleanup path for invalid perf_type strings 2019-05-31 06:47:33 -07:00
rcutorture.c rcutorture: Fix cleanup path for invalid torture_type strings 2019-05-31 06:47:33 -07:00
srcutiny.c srcu: Move rcu_scheduler_starting() from Tiny RCU to Tiny SRCU 2017-07-24 16:03:22 -07:00
srcutree.c doc: Fix various RCU docbook comment-header problems 2017-10-19 22:26:11 -04:00
sync.c doc: Fix various RCU docbook comment-header problems 2017-10-19 22:26:11 -04:00
tiny.c srcu: Move rcu_scheduler_starting() from Tiny RCU to Tiny SRCU 2017-07-24 16:03:22 -07:00
tree_exp.h rcu: Make expedited GPs correctly handle hardware CPU insertion 2017-07-25 13:04:45 -07:00
tree_plugin.h rcu: Call touch_nmi_watchdog() while printing stall warnings 2018-05-30 07:52:39 +02:00
tree.c rcu: Do RCU GP kthread self-wakeup from softirq and interrupt 2019-03-23 14:35:30 +01:00
tree.h Merge branches 'doc.2017.08.17a', 'fixes.2017.08.17a', 'hotplug.2017.07.25b', 'misc.2017.08.17a', 'spin_unlock_wait_no.2017.08.17a', 'srcu.2017.07.27c' and 'torture.2017.07.24c' into HEAD 2017-08-17 08:10:04 -07:00
update.c rcu: Export init_rcu_head() and destroy_rcu_head() to GPL modules 2018-02-16 20:23:11 +01:00