diff options
Diffstat (limited to 'kernel/panic.c')
-rw-r--r-- | kernel/panic.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/kernel/panic.c b/kernel/panic.c index d2db3e2209e0..6ceb664fb52a 100644 --- a/kernel/panic.c +++ b/kernel/panic.c | |||
@@ -271,3 +271,15 @@ void oops_exit(void) | |||
271 | { | 271 | { |
272 | do_oops_enter_exit(); | 272 | do_oops_enter_exit(); |
273 | } | 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 | */ | ||
280 | void __stack_chk_fail(void) | ||
281 | { | ||
282 | panic("stack-protector: Kernel stack is corrupted"); | ||
283 | } | ||
284 | EXPORT_SYMBOL(__stack_chk_fail); | ||
285 | #endif | ||