summaryrefslogtreecommitdiff
path: root/arch/mips/kernel/octeon_switch.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/kernel/octeon_switch.S')
-rw-r--r--arch/mips/kernel/octeon_switch.S7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/mips/kernel/octeon_switch.S b/arch/mips/kernel/octeon_switch.S
index 22e2aa1e8d37..4204d76af854 100644
--- a/arch/mips/kernel/octeon_switch.S
+++ b/arch/mips/kernel/octeon_switch.S
@@ -71,6 +71,13 @@
mtc0 t0, $11,7 /* CvmMemCtl */
#endif
3:
+
+#if defined(CONFIG_CC_STACKPROTECTOR) && !defined(CONFIG_SMP)
+ PTR_L t8, __stack_chk_guard
+ LONG_L t9, TASK_STACK_CANARY(a1)
+ LONG_S t9, 0(t8)
+#endif
+
/*
* The order of restoring the registers takes care of the race
* updating $28, $29 and kernelsp without disabling ints.