[PATCH v2 3/4] signal/x86: Move restore_saved_sigmask().

From: NIIBE Yutaka
Date: Wed Mar 21 2018 - 21:45:42 EST


Call to restore_saved_sigmask is only needed when it is from a system
call. It is only woken up system call which uses saved_sigmask.
Specifically, they are pselect, ppoll, and epoll_pwait.

Signed-off-by: NIIBE Yutaka <gniibe@xxxxxxxx>
---
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 e709b54a01b8..9c24df5ca2d4 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