diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2014-01-30 20:06:30 -0500 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2014-02-23 12:01:13 -0500 |
commit | fac480efcba6a9f0aea91947f151fd569538b0af (patch) | |
tree | fb3f5998968d9a98633df3314d45fe08388edbd2 | |
parent | 36970bb91d89618d3495babf44b934e9c9db6bbc (diff) |
rcutorture: Add diagnostic for unscheduled system shutdown
Currently, rcutorture can terminate via rmmod, via self-shutdown,
via something else shutting the system down, or of course the usual
catastrophic termination. The first two get flagged, so this commit adds
a message for the third. For the fourth, your warranty is void as always.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
-rw-r--r-- | kernel/torture.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/kernel/torture.c b/kernel/torture.c index ed360cf948da..d51de3029a5c 100644 --- a/kernel/torture.c +++ b/kernel/torture.c | |||
@@ -438,10 +438,12 @@ static int torture_shutdown_notify(struct notifier_block *unused1, | |||
438 | unsigned long unused2, void *unused3) | 438 | unsigned long unused2, void *unused3) |
439 | { | 439 | { |
440 | mutex_lock(&fullstop_mutex); | 440 | mutex_lock(&fullstop_mutex); |
441 | if (fullstop == FULLSTOP_DONTSTOP) | 441 | if (fullstop == FULLSTOP_DONTSTOP) { |
442 | VERBOSE_TOROUT_STRING("Unscheduled system shutdown detected"); | ||
442 | fullstop = FULLSTOP_SHUTDOWN; | 443 | fullstop = FULLSTOP_SHUTDOWN; |
443 | else | 444 | } else { |
444 | pr_warn("Concurrent rmmod and shutdown illegal!\n"); | 445 | pr_warn("Concurrent rmmod and shutdown illegal!\n"); |
446 | } | ||
445 | mutex_unlock(&fullstop_mutex); | 447 | mutex_unlock(&fullstop_mutex); |
446 | return NOTIFY_DONE; | 448 | return NOTIFY_DONE; |
447 | } | 449 | } |