aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/panic.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/panic.c')
-rw-r--r--kernel/panic.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/kernel/panic.c b/kernel/panic.c
index 13f06349a786..3a0b0898690a 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 /*
@@ -353,15 +356,22 @@ EXPORT_SYMBOL(warn_slowpath);
353#endif 356#endif
354 357
355#ifdef CONFIG_CC_STACKPROTECTOR 358#ifdef CONFIG_CC_STACKPROTECTOR
359
360#ifndef GCC_HAS_SP
361#warning You have selected the CONFIG_CC_STACKPROTECTOR option, but the gcc used does not support this.
362#endif
363
356/* 364/*
357 * Called when gcc's -fstack-protector feature is used, and 365 * Called when gcc's -fstack-protector feature is used, and
358 * gcc detects corruption of the on-stack canary value 366 * gcc detects corruption of the on-stack canary value
359 */ 367 */
360void __stack_chk_fail(void) 368void __stack_chk_fail(void)
361{ 369{
362 panic("stack-protector: Kernel stack is corrupted"); 370 panic("stack-protector: Kernel stack is corrupted in: %p\n",
371 __builtin_return_address(0));
363} 372}
364EXPORT_SYMBOL(__stack_chk_fail); 373EXPORT_SYMBOL(__stack_chk_fail);
374
365#endif 375#endif
366 376
367core_param(panic, panic_timeout, int, 0644); 377core_param(panic, panic_timeout, int, 0644);