Merge branch 'block' of git://brick.kernel.dk/data/git/linux-2.6-block
[pandora-kernel.git] / kernel / panic.c
index 8010b9b..525e365 100644 (file)
@@ -270,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