diff options
Diffstat (limited to 'init/main.c')
-rw-r--r-- | init/main.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/init/main.c b/init/main.c index c445c1fb19b9..c0b6499c31db 100644 --- a/init/main.c +++ b/init/main.c @@ -1088,7 +1088,13 @@ void start_kernel(void) /* Do the rest non-__init'ed, we're now alive */ arch_call_rest_init(); + /* + * Avoid stack canaries in callers of boot_init_stack_canary for gcc-10 + * and older. + */ +#if !__has_attribute(__no_stack_protector__) prevent_tail_call_optimization(); +#endif } /* Call all constructor functions linked into the kernel. */ |