X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=kernel%2Fpanic.c;h=525e365f72390bb3fb4601c0be4c4bd81214eceb;hb=bdbf77d6707a52bdeff223d0a60df12d086d21d7;hp=d8a0bca21233e12d413fa9ab60c436b9b36e0db7;hpb=7d450e00711bf8c72fc781677f7abc08d227578e;p=linux-2.6 diff --git a/kernel/panic.c b/kernel/panic.c index d8a0bca212..525e365f72 100644 --- a/kernel/panic.c +++ b/kernel/panic.c @@ -18,6 +18,7 @@ #include #include #include +#include int panic_on_oops; int tainted; @@ -172,7 +173,7 @@ const char *print_tainted(void) void add_taint(unsigned flag) { - debug_locks_off(); /* can't trust the integrity of the kernel anymore */ + debug_locks = 0; /* can't trust the integrity of the kernel anymore */ tainted |= flag; } EXPORT_SYMBOL(add_taint); @@ -269,3 +270,15 @@ void oops_exit(void) { do_oops_enter_exit(); } + +#ifdef CONFIG_CC_STACKPROTECTOR +/* + * Called when gcc's -fstack-protector feature is used, and + * gcc detects corruption of the on-stack canary value + */ +void __stack_chk_fail(void) +{ + panic("stack-protector: Kernel stack is corrupted"); +} +EXPORT_SYMBOL(__stack_chk_fail); +#endif