aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/panic.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/panic.c')
-rw-r--r--kernel/panic.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/kernel/panic.c b/kernel/panic.c
index 8010b9b17aca..6ceb664fb52a 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -21,6 +21,7 @@
21#include <linux/debug_locks.h> 21#include <linux/debug_locks.h>
22 22
23int panic_on_oops; 23int panic_on_oops;
24int panic_on_unrecovered_nmi;
24int tainted; 25int tainted;
25static int pause_on_oops; 26static int pause_on_oops;
26static int pause_on_oops_flag; 27static int pause_on_oops_flag;
@@ -270,3 +271,15 @@ void oops_exit(void)
270{ 271{
271 do_oops_enter_exit(); 272 do_oops_enter_exit();
272} 273}
274
275#ifdef CONFIG_CC_STACKPROTECTOR
276/*
277 * Called when gcc's -fstack-protector feature is used, and
278 * gcc detects corruption of the on-stack canary value
279 */
280void __stack_chk_fail(void)
281{
282 panic("stack-protector: Kernel stack is corrupted");
283}
284EXPORT_SYMBOL(__stack_chk_fail);
285#endif