From 5b0a4f9e13343ce3e05aa4e019cd9492b2f9636a Mon Sep 17 00:00:00 2001 From: Al Viro Date: Mon, 21 Nov 2022 21:59:00 +0800 Subject: [PATCH] nios2: restarts apply only to the first sigframe we build... stable inclusion from stable-v5.10.138 commit 600ff4b13b0ecb94e7ba21531c7386074cca56ea category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I60QFD Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=600ff4b13b0ecb94e7ba21531c7386074cca56ea -------------------------------- commit 411a76b7219555c55867466c82d70ce928d6c9e1 upstream. Fixes: b53e906d255d ("nios2: Signal handling support") Signed-off-by: Al Viro Signed-off-by: Dinh Nguyen Signed-off-by: Greg Kroah-Hartman Signed-off-by: Zheng Zengkai Reviewed-by: Wei Li --- arch/nios2/kernel/signal.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/nios2/kernel/signal.c b/arch/nios2/kernel/signal.c index d5000d494699..916180e4a997 100644 --- a/arch/nios2/kernel/signal.c +++ b/arch/nios2/kernel/signal.c @@ -264,6 +264,7 @@ static int do_signal(struct pt_regs *regs) regs->ea = restart_addr; break; } + regs->orig_r2 = -1; } if (get_signal(&ksig)) { -- GitLab