diff options
Diffstat (limited to 'kernel/panic.c')
| -rw-r--r-- | kernel/panic.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/kernel/panic.c b/kernel/panic.c index 6d6300375090..d02fa9fef46a 100644 --- a/kernel/panic.c +++ b/kernel/panic.c | |||
| @@ -100,7 +100,7 @@ void panic(const char *fmt, ...) | |||
| 100 | va_start(args, fmt); | 100 | va_start(args, fmt); |
| 101 | vsnprintf(buf, sizeof(buf), fmt, args); | 101 | vsnprintf(buf, sizeof(buf), fmt, args); |
| 102 | va_end(args); | 102 | va_end(args); |
| 103 | printk(KERN_EMERG "Kernel panic - not syncing: %s\n",buf); | 103 | pr_emerg("Kernel panic - not syncing: %s\n", buf); |
| 104 | #ifdef CONFIG_DEBUG_BUGVERBOSE | 104 | #ifdef CONFIG_DEBUG_BUGVERBOSE |
| 105 | /* | 105 | /* |
| 106 | * Avoid nested stack-dumping if a panic occurs during oops processing | 106 | * Avoid nested stack-dumping if a panic occurs during oops processing |
| @@ -141,7 +141,7 @@ void panic(const char *fmt, ...) | |||
| 141 | * Delay timeout seconds before rebooting the machine. | 141 | * Delay timeout seconds before rebooting the machine. |
| 142 | * We can't use the "normal" timers since we just panicked. | 142 | * We can't use the "normal" timers since we just panicked. |
| 143 | */ | 143 | */ |
| 144 | printk(KERN_EMERG "Rebooting in %d seconds..", panic_timeout); | 144 | pr_emerg("Rebooting in %d seconds..", panic_timeout); |
| 145 | 145 | ||
| 146 | for (i = 0; i < panic_timeout * 1000; i += PANIC_TIMER_STEP) { | 146 | for (i = 0; i < panic_timeout * 1000; i += PANIC_TIMER_STEP) { |
| 147 | touch_nmi_watchdog(); | 147 | touch_nmi_watchdog(); |
| @@ -165,7 +165,7 @@ void panic(const char *fmt, ...) | |||
| 165 | extern int stop_a_enabled; | 165 | extern int stop_a_enabled; |
| 166 | /* Make sure the user can actually press Stop-A (L1-A) */ | 166 | /* Make sure the user can actually press Stop-A (L1-A) */ |
| 167 | stop_a_enabled = 1; | 167 | stop_a_enabled = 1; |
| 168 | printk(KERN_EMERG "Press Stop-A (L1-A) to return to the boot prom\n"); | 168 | pr_emerg("Press Stop-A (L1-A) to return to the boot prom\n"); |
| 169 | } | 169 | } |
| 170 | #endif | 170 | #endif |
| 171 | #if defined(CONFIG_S390) | 171 | #if defined(CONFIG_S390) |
| @@ -176,6 +176,7 @@ void panic(const char *fmt, ...) | |||
| 176 | disabled_wait(caller); | 176 | disabled_wait(caller); |
| 177 | } | 177 | } |
| 178 | #endif | 178 | #endif |
| 179 | pr_emerg("---[ end Kernel panic - not syncing: %s\n", buf); | ||
| 179 | local_irq_enable(); | 180 | local_irq_enable(); |
| 180 | for (i = 0; ; i += PANIC_TIMER_STEP) { | 181 | for (i = 0; ; i += PANIC_TIMER_STEP) { |
| 181 | touch_softlockup_watchdog(); | 182 | touch_softlockup_watchdog(); |
| @@ -199,7 +200,7 @@ struct tnt { | |||
| 199 | static const struct tnt tnts[] = { | 200 | static const struct tnt tnts[] = { |
| 200 | { TAINT_PROPRIETARY_MODULE, 'P', 'G' }, | 201 | { TAINT_PROPRIETARY_MODULE, 'P', 'G' }, |
| 201 | { TAINT_FORCED_MODULE, 'F', ' ' }, | 202 | { TAINT_FORCED_MODULE, 'F', ' ' }, |
| 202 | { TAINT_UNSAFE_SMP, 'S', ' ' }, | 203 | { TAINT_CPU_OUT_OF_SPEC, 'S', ' ' }, |
| 203 | { TAINT_FORCED_RMMOD, 'R', ' ' }, | 204 | { TAINT_FORCED_RMMOD, 'R', ' ' }, |
| 204 | { TAINT_MACHINE_CHECK, 'M', ' ' }, | 205 | { TAINT_MACHINE_CHECK, 'M', ' ' }, |
| 205 | { TAINT_BAD_PAGE, 'B', ' ' }, | 206 | { TAINT_BAD_PAGE, 'B', ' ' }, |
| @@ -210,6 +211,7 @@ static const struct tnt tnts[] = { | |||
| 210 | { TAINT_CRAP, 'C', ' ' }, | 211 | { TAINT_CRAP, 'C', ' ' }, |
| 211 | { TAINT_FIRMWARE_WORKAROUND, 'I', ' ' }, | 212 | { TAINT_FIRMWARE_WORKAROUND, 'I', ' ' }, |
| 212 | { TAINT_OOT_MODULE, 'O', ' ' }, | 213 | { TAINT_OOT_MODULE, 'O', ' ' }, |
| 214 | { TAINT_UNSIGNED_MODULE, 'E', ' ' }, | ||
| 213 | }; | 215 | }; |
| 214 | 216 | ||
| 215 | /** | 217 | /** |
| @@ -228,6 +230,7 @@ static const struct tnt tnts[] = { | |||
| 228 | * 'C' - modules from drivers/staging are loaded. | 230 | * 'C' - modules from drivers/staging are loaded. |
| 229 | * 'I' - Working around severe firmware bug. | 231 | * 'I' - Working around severe firmware bug. |
| 230 | * 'O' - Out-of-tree module has been loaded. | 232 | * 'O' - Out-of-tree module has been loaded. |
| 233 | * 'E' - Unsigned module has been loaded. | ||
| 231 | * | 234 | * |
| 232 | * The string is overwritten by the next call to print_tainted(). | 235 | * The string is overwritten by the next call to print_tainted(). |
| 233 | */ | 236 | */ |
| @@ -274,8 +277,7 @@ unsigned long get_taint(void) | |||
| 274 | void add_taint(unsigned flag, enum lockdep_ok lockdep_ok) | 277 | void add_taint(unsigned flag, enum lockdep_ok lockdep_ok) |
| 275 | { | 278 | { |
| 276 | if (lockdep_ok == LOCKDEP_NOW_UNRELIABLE && __debug_locks_off()) | 279 | if (lockdep_ok == LOCKDEP_NOW_UNRELIABLE && __debug_locks_off()) |
| 277 | printk(KERN_WARNING | 280 | pr_warn("Disabling lock debugging due to kernel taint\n"); |
| 278 | "Disabling lock debugging due to kernel taint\n"); | ||
| 279 | 281 | ||
| 280 | set_bit(flag, &tainted_mask); | 282 | set_bit(flag, &tainted_mask); |
| 281 | } | 283 | } |
| @@ -380,8 +382,7 @@ late_initcall(init_oops_id); | |||
| 380 | void print_oops_end_marker(void) | 382 | void print_oops_end_marker(void) |
| 381 | { | 383 | { |
| 382 | init_oops_id(); | 384 | init_oops_id(); |
| 383 | printk(KERN_WARNING "---[ end trace %016llx ]---\n", | 385 | pr_warn("---[ end trace %016llx ]---\n", (unsigned long long)oops_id); |
| 384 | (unsigned long long)oops_id); | ||
| 385 | } | 386 | } |
| 386 | 387 | ||
| 387 | /* | 388 | /* |
| @@ -459,7 +460,7 @@ EXPORT_SYMBOL(warn_slowpath_null); | |||
| 459 | * Called when gcc's -fstack-protector feature is used, and | 460 | * Called when gcc's -fstack-protector feature is used, and |
| 460 | * gcc detects corruption of the on-stack canary value | 461 | * gcc detects corruption of the on-stack canary value |
| 461 | */ | 462 | */ |
| 462 | void __stack_chk_fail(void) | 463 | __visible void __stack_chk_fail(void) |
| 463 | { | 464 | { |
| 464 | panic("stack-protector: Kernel stack is corrupted in: %p\n", | 465 | panic("stack-protector: Kernel stack is corrupted in: %p\n", |
| 465 | __builtin_return_address(0)); | 466 | __builtin_return_address(0)); |
