make m32r handle multiple pending signals
authorAl Viro <viro@zeniv.linux.org.uk>
Fri, 24 Sep 2010 05:22:30 +0000 (06:22 +0100)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 24 Sep 2010 20:54:19 +0000 (13:54 -0700)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/m32r/kernel/entry.S
arch/m32r/kernel/signal.c

index 90149daa560fb848e0f58e935b543f7d76c7b4f9..225412bc227e690bcb313743dd16f58fca5c4115 100644 (file)
@@ -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
index acd69f7f3357ecf46ce7aa36df03665b6b50b754..db152263484f0f6e97092d741ed15c7079afdc3e 100644 (file)
@@ -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;
                }
        }
 
@@ -353,8 +354,8 @@ 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);
@@ -362,6 +363,7 @@ static int do_signal(struct pt_regs *regs)
                                regs->bpc -= 2;
                        else
                                regs->bpc -= 4;
+                       regs->syscall_nr = -1;
                }
        }
        if (test_thread_flag(TIF_RESTORE_SIGMASK)) {