diff options
| author | Ingo Molnar <mingo@elte.hu> | 2009-03-08 11:48:51 -0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2009-03-08 11:48:51 -0400 |
| commit | dba58e39ced7af63f2748d12bbb2b4ac83c72391 (patch) | |
| tree | ee15a5e7667b51d0d0f7e8cb39064652f7c84c28 /kernel/panic.c | |
| parent | 9de36825b321fe9fe9cf73260554251af579f4ca (diff) | |
| parent | 78ff7fae04554b49d29226ed12536268c2500d1f (diff) | |
Merge branches 'tracing/doc', 'tracing/ftrace', 'tracing/printk' and 'tracing/textedit' into tracing/core
Diffstat (limited to 'kernel/panic.c')
| -rw-r--r-- | kernel/panic.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/kernel/panic.c b/kernel/panic.c index 2a2ff36ff44d..32fe4eff1b89 100644 --- a/kernel/panic.c +++ b/kernel/panic.c | |||
| @@ -74,6 +74,9 @@ NORET_TYPE void panic(const char * fmt, ...) | |||
| 74 | vsnprintf(buf, sizeof(buf), fmt, args); | 74 | vsnprintf(buf, sizeof(buf), fmt, args); |
| 75 | va_end(args); | 75 | va_end(args); |
| 76 | printk(KERN_EMERG "Kernel panic - not syncing: %s\n",buf); | 76 | printk(KERN_EMERG "Kernel panic - not syncing: %s\n",buf); |
| 77 | #ifdef CONFIG_DEBUG_BUGVERBOSE | ||
| 78 | dump_stack(); | ||
| 79 | #endif | ||
| 77 | bust_spinlocks(0); | 80 | bust_spinlocks(0); |
| 78 | 81 | ||
| 79 | /* | 82 | /* |
| @@ -355,15 +358,18 @@ EXPORT_SYMBOL(warn_slowpath); | |||
| 355 | #endif | 358 | #endif |
| 356 | 359 | ||
| 357 | #ifdef CONFIG_CC_STACKPROTECTOR | 360 | #ifdef CONFIG_CC_STACKPROTECTOR |
| 361 | |||
| 358 | /* | 362 | /* |
| 359 | * Called when gcc's -fstack-protector feature is used, and | 363 | * Called when gcc's -fstack-protector feature is used, and |
| 360 | * gcc detects corruption of the on-stack canary value | 364 | * gcc detects corruption of the on-stack canary value |
| 361 | */ | 365 | */ |
| 362 | void __stack_chk_fail(void) | 366 | void __stack_chk_fail(void) |
| 363 | { | 367 | { |
| 364 | panic("stack-protector: Kernel stack is corrupted"); | 368 | panic("stack-protector: Kernel stack is corrupted in: %p\n", |
| 369 | __builtin_return_address(0)); | ||
| 365 | } | 370 | } |
| 366 | EXPORT_SYMBOL(__stack_chk_fail); | 371 | EXPORT_SYMBOL(__stack_chk_fail); |
| 372 | |||
| 367 | #endif | 373 | #endif |
| 368 | 374 | ||
| 369 | core_param(panic, panic_timeout, int, 0644); | 375 | core_param(panic, panic_timeout, int, 0644); |
