From: Paul E. McKenney Date: Fri, 31 Jan 2014 01:06:30 +0000 (-0800) Subject: rcutorture: Add diagnostic for unscheduled system shutdown X-Git-Tag: firefly_0821_release~176^2~4237^2~1^2^2~25 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=fac480efcba6a9f0aea91947f151fd569538b0af;p=firefly-linux-kernel-4.4.55.git 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 Reviewed-by: Josh Triplett --- 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, unsigned long unused2, void *unused3) { mutex_lock(&fullstop_mutex); - if (fullstop == FULLSTOP_DONTSTOP) + if (fullstop == FULLSTOP_DONTSTOP) { + VERBOSE_TOROUT_STRING("Unscheduled system shutdown detected"); fullstop = FULLSTOP_SHUTDOWN; - else + } else { pr_warn("Concurrent rmmod and shutdown illegal!\n"); + } mutex_unlock(&fullstop_mutex); return NOTIFY_DONE; }