unicore32: if there's no handler we need to restore sigmask, syscall or no syscall
authorAl Viro <viro@zeniv.linux.org.uk>
Thu, 26 Apr 2012 22:17:28 +0000 (18:17 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Tue, 22 May 2012 04:01:09 +0000 (00:01 -0400)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
arch/unicore32/kernel/signal.c

index 72d9531..7754df6 100644 (file)
@@ -447,15 +447,12 @@ static void do_signal(struct pt_regs *regs, int syscall)
                    regs->UCreg_00 == -ERESTARTNOINTR) {
                        setup_syscall_restart(regs);
                }
-
-               /* If there's no signal to deliver, we just put the saved
-                * sigmask back.
-                */
-               if (test_thread_flag(TIF_RESTORE_SIGMASK)) {
-                       clear_thread_flag(TIF_RESTORE_SIGMASK);
-                       sigprocmask(SIG_SETMASK, &current->saved_sigmask, NULL);
-               }
        }
+       /* If there's no signal to deliver, we just put the saved
+        * sigmask back.
+        */
+       if (test_and_clear_thread_flag(TIF_RESTORE_SIGMASK))
+               set_current_blocked(&current->saved_sigmask);
 }
 
 asmlinkage void do_notify_resume(struct pt_regs *regs,