Message ID | 1554192153-2587-3-git-send-email-guoren@kernel.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/3] csky: Use in_syscall & forget_syscall instead of r11_sig | expand |
Looks good,
Reviewed-by: Christoph Hellwig <hch@lst.de>
On Tue, 09 Apr 2019 23:53:04 PDT (-0700), Christoph Hellwig wrote: > Looks good, > > Reviewed-by: Christoph Hellwig <hch@lst.de> Thanks! I've pulled just this patch into my for-next, as I'm assuming the c-sky patches will go in seperately. Given that it's been on the list for a while I think it's a good candidate for rc7, so unless anyone says something or testing causes a problem I'll send it up tomorrow.
diff --git a/arch/riscv/kernel/signal.c b/arch/riscv/kernel/signal.c index 837e164..804d6ee 100644 --- a/arch/riscv/kernel/signal.c +++ b/arch/riscv/kernel/signal.c @@ -234,6 +234,9 @@ static void handle_signal(struct ksignal *ksig, struct pt_regs *regs) /* Are we from a system call? */ if (regs->scause == EXC_SYSCALL) { + /* Avoid additional syscall restarting via ret_from_exception */ + regs->scause = -1UL; + /* If so, check system call restarting.. */ switch (regs->a0) { case -ERESTART_RESTARTBLOCK: @@ -272,6 +275,9 @@ static void do_signal(struct pt_regs *regs) /* Did we come from a system call? */ if (regs->scause == EXC_SYSCALL) { + /* Avoid additional syscall restarting via ret_from_exception */ + regs->scause = -1UL; + /* Restart the system call - no handlers present */ switch (regs->a0) { case -ERESTARTNOHAND: