The prototype of rseq_handle_notify_resume() and rseq_signal_deliver()
had to be changed to fix handling of traps occuring on signal delivery.
The API change was merged at the same time as the rseq MIPS port.

Adapt the MIPS port to this API change.

Fixes: 784e0300fe ("rseq: Avoid infinite recursion when delivering SIGSEGV")
Signed-off-by: Mathieu Desnoyers <[email protected]>
Cc: Will Deacon <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Mathieu Desnoyers <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: Ralf Baechle <[email protected]>
Cc: Paul Burton <[email protected]>
Cc: James Hogan <[email protected]>
---
 arch/mips/kernel/signal.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/mips/kernel/signal.c b/arch/mips/kernel/signal.c
index 00f2535d2226..0a9cfe7a0372 100644
--- a/arch/mips/kernel/signal.c
+++ b/arch/mips/kernel/signal.c
@@ -801,7 +801,7 @@ static void handle_signal(struct ksignal *ksig, struct 
pt_regs *regs)
                regs->regs[0] = 0;              /* Don't deal with this again.  
*/
        }
 
-       rseq_signal_deliver(regs);
+       rseq_signal_deliver(ksig, regs);
 
        if (sig_uses_siginfo(&ksig->ka, abi))
                ret = abi->setup_rt_frame(vdso + abi->vdso->off_rt_sigreturn,
@@ -870,7 +870,7 @@ asmlinkage void do_notify_resume(struct pt_regs *regs, void 
*unused,
        if (thread_info_flags & _TIF_NOTIFY_RESUME) {
                clear_thread_flag(TIF_NOTIFY_RESUME);
                tracehook_notify_resume(regs);
-               rseq_handle_notify_resume(regs);
+               rseq_handle_notify_resume(NULL, regs);
        }
 
        user_enter();
-- 
2.11.0

Reply via email to