Skip to content

Commit ce8042d

Browse files
yong-xuanjfvogel
authored andcommitted
riscv: signal: fix signal_minsigstksz
commit 564fc8e upstream. The init_rt_signal_env() funciton is called before the alternative patch is applied, so using the alternative-related API to check the availability of an extension within this function doesn't have the intended effect. This patch reorders the init_rt_signal_env() and apply_boot_alternatives() to get the correct signal_minsigstksz. Fixes: e92f469 ("riscv: signal: Report signal frame size to userspace via auxv") Signed-off-by: Yong-Xuan Wang <yongxuan.wang@sifive.com> Reviewed-by: Zong Li <zong.li@sifive.com> Reviewed-by: Andy Chiu <andybnac@gmail.com> Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com> Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20241220083926.19453-3-yongxuan.wang@sifive.com Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> (cherry picked from commit 45233962ea51aed6cfb540277e80bfd9c13dc0e6) Signed-off-by: Jack Vogel <jack.vogel@oracle.com>
1 parent def6d67 commit ce8042d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/riscv/kernel/setup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,8 +288,8 @@ void __init setup_arch(char **cmdline_p)
288288

289289
riscv_init_cbo_blocksizes();
290290
riscv_fill_hwcap();
291-
init_rt_signal_env();
292291
apply_boot_alternatives();
292+
init_rt_signal_env();
293293

294294
if (IS_ENABLED(CONFIG_RISCV_ISA_ZICBOM) &&
295295
riscv_isa_extension_available(NULL, ZICBOM))

0 commit comments

Comments
 (0)