Skip to content

Commit

Permalink
make m32r handle multiple pending signals
Browse files Browse the repository at this point in the history
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Al Viro authored and Linus Torvalds committed Sep 24, 2010
1 parent a7f8388 commit a748102
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions arch/m32r/kernel/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -235,9 +235,9 @@ work_resched:
work_notifysig: ; deal with pending signals and
; notify-resume requests
mv r0, sp ; arg1 : struct pt_regs *regs
ldi r1, r9 ; arg2 : __u32 thread_info_flags
mv r1, r9 ; arg2 : __u32 thread_info_flags
bl do_notify_resume
bra restore_all
bra resume_userspace

; perform syscall exit tracing
ALIGN
Expand Down
6 changes: 4 additions & 2 deletions arch/m32r/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ handle_signal(unsigned long sig, struct k_sigaction *ka, siginfo_t *info,
regs->bpc -= 2;
else
regs->bpc -= 4;
regs->syscall_nr = -1;
}
}

Expand Down Expand Up @@ -353,15 +354,16 @@ static int do_signal(struct pt_regs *regs)
regs->bpc -= 2;
else
regs->bpc -= 4;
}
if (regs->r0 == -ERESTART_RESTARTBLOCK){
regs->syscall_nr = -1;
} else if (regs->r0 == -ERESTART_RESTARTBLOCK){
regs->r0 = regs->orig_r0;
regs->r7 = __NR_restart_syscall;
inst = *(unsigned short *)(regs->bpc - 2);
if ((inst & 0xfff0) == 0x10f0) /* trap ? */
regs->bpc -= 2;
else
regs->bpc -= 4;
regs->syscall_nr = -1;
}
}
if (test_thread_flag(TIF_RESTORE_SIGMASK)) {
Expand Down

0 comments on commit a748102

Please sign in to comment.