panic: add TAINT_SOFTLOCKUP

This taint flag will be set if the system has ever entered a softlockup
state.  Similar to TAINT_WARN it is useful to know whether or not the
system has been in a softlockup state when debugging.

[[email protected]: apply the taint before calling panic()]
Signed-off-by: Josh Hunt <[email protected]>
Cc: Jason Baron <[email protected]>
Cc: Randy Dunlap <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
Josh Hunt 2014-08-08 14:22:31 -07:00 • committed by Linus Torvalds
commit 69361eef90
5 changed files with 6 additions and 0 deletions

View file

@ -368,6 +368,7 @@ static enum hrtimer_restart watchdog_timer_fn(struct hrtimer *hrtimer)
smp_mb__after_atomic();
}
add_taint(TAINT_SOFTLOCKUP, LOCKDEP_STILL_OK);
if (softlockup_panic)
panic("softlockup: hung tasks");
__this_cpu_write(soft_watchdog_warn, true);