Call to restore_saved_sigmask is only needed when it is from a system call. It is only unblocked system call which uses saved_sigmask. Specifically, they are pselect, ppoll, and epoll_pwait.
Signed-off-by: NIIBE Yutaka <gni...@fsij.org> --- arch/x86/kernel/signal.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/x86/kernel/signal.c b/arch/x86/kernel/signal.c index 57576988a01f..c3928718a33a 100644 --- a/arch/x86/kernel/signal.c +++ b/arch/x86/kernel/signal.c @@ -834,13 +834,13 @@ void nosig_restart_syscall(struct pt_regs *regs) regs->ip -= 2; break; } - } - /* - * If there's no signal to deliver, we just put the saved sigmask - * back. - */ - restore_saved_sigmask(); + /* + * If there's no signal to deliver, we just put the + * saved sigmask back. + */ + restore_saved_sigmask(); + } } void signal_fault(struct pt_regs *regs, void __user *frame, char *where) -- 2.11.0