diff options
-rw-r--r-- | arch/mips/kernel/signal.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/arch/mips/kernel/signal.c b/arch/mips/kernel/signal.c index 0e1a5b8ae817..b6aa77035019 100644 --- a/arch/mips/kernel/signal.c +++ b/arch/mips/kernel/signal.c | |||
@@ -568,17 +568,20 @@ static void do_signal(struct pt_regs *regs) | |||
568 | } | 568 | } |
569 | 569 | ||
570 | if (regs->regs[0]) { | 570 | if (regs->regs[0]) { |
571 | if (regs->regs[2] == ERESTARTNOHAND || | 571 | switch (regs->regs[2]) { |
572 | regs->regs[2] == ERESTARTSYS || | 572 | case ERESTARTNOHAND: |
573 | regs->regs[2] == ERESTARTNOINTR) { | 573 | case ERESTARTSYS: |
574 | case ERESTARTNOINTR: | ||
574 | regs->regs[2] = regs->regs[0]; | 575 | regs->regs[2] = regs->regs[0]; |
575 | regs->regs[7] = regs->regs[26]; | 576 | regs->regs[7] = regs->regs[26]; |
576 | regs->cp0_epc -= 4; | 577 | regs->cp0_epc -= 4; |
577 | } | 578 | break; |
578 | if (regs->regs[2] == ERESTART_RESTARTBLOCK) { | 579 | |
580 | case ERESTART_RESTARTBLOCK: | ||
579 | regs->regs[2] = current->thread.abi->restart; | 581 | regs->regs[2] = current->thread.abi->restart; |
580 | regs->regs[7] = regs->regs[26]; | 582 | regs->regs[7] = regs->regs[26]; |
581 | regs->cp0_epc -= 4; | 583 | regs->cp0_epc -= 4; |
584 | break; | ||
582 | } | 585 | } |
583 | regs->regs[0] = 0; /* Don't deal with this again. */ | 586 | regs->regs[0] = 0; /* Don't deal with this again. */ |
584 | } | 587 | } |