From 13fdd31abec5f48cf97693bd14d2e11e0779b4ca Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Tue, 8 Aug 2006 03:47:01 +0100 Subject: [MIPS] Avoid double signal restarting. In entry.S resume_userspace ... jal do_notify_resume form a loop through which the kernel will iterate as long as work is pending. If we iterate through this loop more than once with no signal pending for at least one but the last iteration we will take do the syscall restarting multiple times resulting in a syscall return prior to the the syscall instruction in userspace. This may happen when debugging a multithreaded program. Debugging and original fix by Maciej; extended to other ABIs by me. Signed-off-by: Maciej W. Rozycki Signed-off-by: Ralf Baechle --- arch/mips/kernel/irixsig.c | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/mips/kernel/irixsig.c') diff --git a/arch/mips/kernel/irixsig.c b/arch/mips/kernel/irixsig.c index 052ea15f1e80..719364752e77 100644 --- a/arch/mips/kernel/irixsig.c +++ b/arch/mips/kernel/irixsig.c @@ -224,6 +224,7 @@ void do_irix_signal(struct pt_regs *regs) regs->regs[7] = regs->regs[26]; regs->cp0_epc -= 4; } + regs->regs[0] = 0; /* Don't deal with this again. */ } /* -- cgit v1.2.3-59-g8ed1b