From: Al Viro Date: Thu, 26 Apr 2012 22:15:11 +0000 (-0400) Subject: arm: if there's no handler we need to restore sigmask, syscall or no syscall X-Git-Tag: v3.5-rc1~48^2^2~6 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=7dfae72027cd8345247e675a3b27439df95fe06e;p=karo-tx-linux.git arm: if there's no handler we need to restore sigmask, syscall or no syscall Signed-off-by: Al Viro --- diff --git a/arch/arm/kernel/signal.c b/arch/arm/kernel/signal.c index d554025dbcbc..a6c4e780ec7a 100644 --- a/arch/arm/kernel/signal.c +++ b/arch/arm/kernel/signal.c @@ -715,15 +715,13 @@ static void do_signal(struct pt_regs *regs, int syscall) #endif } } - - /* 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, ¤t->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(¤t->saved_sigmask); } asmlinkage void