summaryrefslogtreecommitdiffstats
path: root/arch/riscv/include/asm/stackprotector.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/riscv/include/asm/stackprotector.h')
-rw-r--r--arch/riscv/include/asm/stackprotector.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/riscv/include/asm/stackprotector.h b/arch/riscv/include/asm/stackprotector.h
index 5962f8891..09093af46 100644
--- a/arch/riscv/include/asm/stackprotector.h
+++ b/arch/riscv/include/asm/stackprotector.h
@@ -24,6 +24,7 @@ static __always_inline void boot_init_stack_canary(void)
canary &= CANARY_MASK;
current->stack_canary = canary;
- __stack_chk_guard = current->stack_canary;
+ if (!IS_ENABLED(CONFIG_STACKPROTECTOR_PER_TASK))
+ __stack_chk_guard = current->stack_canary;
}
#endif /* _ASM_RISCV_STACKPROTECTOR_H */