]> git.karo-electronics.de Git - linux-beck.git/commit
rcutorture: Fix rcutorture shutdown races
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Sat, 1 Feb 2014 01:37:28 +0000 (17:37 -0800)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Sun, 23 Feb 2014 17:03:21 +0000 (09:03 -0800)
commit7fafaac5b9ce22cc57777865390520476ad2262d
treec857b24b21d277b45803878af0715c817fb4716a
parent14562d1cf12b434da2c69b5603a4149ac43f3b48
rcutorture: Fix rcutorture shutdown races

Not all of the rcutorture kthreads waited for kthread_should_stop()
before returning from their top-level functions, and none of them
used torture_shutdown_absorb() properly.  These problems can result in
segfaults and hangs at shutdown time, and some recent changes perturbed
timing sufficiently to make them much more probable.  This commit
therefore creates a torture_kthread_stopping() function that does the
proper kthread shutdown dance in one centralized location.

Accommodate this grouping by making VERBOSE_TOROUT_STRING() capable of
taking a non-const string as its argument, which allows the new
torture_kthread_stopping() to pass its "title" argument directly to
the updated version of VERBOSE_TOROUT_STRING().

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
include/linux/torture.h
kernel/rcu/rcutorture.c
kernel/torture.c