]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
panic: add TAINT_SOFTLOCKUP
authorJosh Hunt <johunt@akamai.com>
Fri, 8 Aug 2014 21:22:31 +0000 (14:22 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 8 Aug 2014 22:57:24 +0000 (15:57 -0700)
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.

[akpm@linux-foundation.org: apply the taint before calling panic()]
Signed-off-by: Josh Hunt <johunt@akamai.com>
Cc: Jason Baron <jbaron@akamai.com>
Cc: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Documentation/oops-tracing.txt
Documentation/sysctl/kernel.txt
include/linux/kernel.h
kernel/panic.c
kernel/watchdog.c

index e3155995ddd878c59d60d3519f2addaac716a743..beefb9f82902569bc120797108dbfc12d01faa97 100644 (file)
@@ -268,6 +268,8 @@ characters, each representing a particular tainted value.
  14: 'E' if an unsigned module has been loaded in a kernel supporting
      module signature.
 
+ 15: 'L' if a soft lockup has previously occurred on the system.
+
 The primary reason for the 'Tainted: ' string is to tell kernel
 debuggers if this is a clean kernel or if anything unusual has
 occurred.  Tainting is permanent: even if an offending module is
index c14374e71775f62ba1ed72a856a702cb1d819e47..f79eb96663790f1c116f6a44d706af048bdedc88 100644 (file)
@@ -826,6 +826,7 @@ can be ORed together:
 4096 - An out-of-tree module has been loaded.
 8192 - An unsigned module has been loaded in a kernel supporting module
        signature.
+16384 - A soft lockup has previously occurred on the system.
 
 ==============================================================
 
index 3dc22abbc68a212023d90d54556a94d8026bcfcb..31ae66f34235e109361951a7c4b4759a45696207 100644 (file)
@@ -470,6 +470,7 @@ extern enum system_states {
 #define TAINT_FIRMWARE_WORKAROUND      11
 #define TAINT_OOT_MODULE               12
 #define TAINT_UNSIGNED_MODULE          13
+#define TAINT_SOFTLOCKUP               14
 
 extern const char hex_asc[];
 #define hex_asc_lo(x)  hex_asc[((x) & 0x0f)]
index 62e16cef9cc23e848f524ed650617741d69069bd..d09dc5c32c6740e41a5987cca0252ad86b43bdbd 100644 (file)
@@ -224,6 +224,7 @@ static const struct tnt tnts[] = {
        { TAINT_FIRMWARE_WORKAROUND,    'I', ' ' },
        { TAINT_OOT_MODULE,             'O', ' ' },
        { TAINT_UNSIGNED_MODULE,        'E', ' ' },
+       { TAINT_SOFTLOCKUP,             'L', ' ' },
 };
 
 /**
index 51b29e9d2ba65a700c15cb71923bce1359ebfa41..a8d6914030fe6ec5aa9e08154ce29b480d2c0745 100644 (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);