aboutsummaryrefslogtreecommitdiffstats
path: root/arch/score
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-05-21 23:42:15 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-06-01 12:58:49 -0400
commita610d6e672d6d3723e8da257ad4a8a288a8f2f89 (patch)
tree2fac6ce7f72756771f4f87583205cc402589dcad /arch/score
parent5754f412a3f107cbcd93ee125bef296f2a07539b (diff)
pull clearing RESTORE_SIGMASK into block_sigmask()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/score')
-rw-r--r--arch/score/kernel/signal.c24
1 files changed, 5 insertions, 19 deletions
diff --git a/arch/score/kernel/signal.c b/arch/score/kernel/signal.c
index b24dfaf2462f..13e0eed0e301 100644
--- a/arch/score/kernel/signal.c
+++ b/arch/score/kernel/signal.c
@@ -241,11 +241,9 @@ give_sigsegv:
241 return -EFAULT; 241 return -EFAULT;
242} 242}
243 243
244static int handle_signal(unsigned long sig, siginfo_t *info, 244static void handle_signal(unsigned long sig, siginfo_t *info,
245 struct k_sigaction *ka, struct pt_regs *regs) 245 struct k_sigaction *ka, struct pt_regs *regs)
246{ 246{
247 int ret;
248
249 if (regs->is_syscall) { 247 if (regs->is_syscall) {
250 switch (regs->regs[4]) { 248 switch (regs->regs[4]) {
251 case ERESTART_RESTARTBLOCK: 249 case ERESTART_RESTARTBLOCK:
@@ -269,12 +267,10 @@ static int handle_signal(unsigned long sig, siginfo_t *info,
269 /* 267 /*
270 * Set up the stack frame 268 * Set up the stack frame
271 */ 269 */
272 ret = setup_rt_frame(ka, regs, sig, sigmask_to_save(), info); 270 if (setup_rt_frame(ka, regs, sig, sigmask_to_save(), info) < 0)
273 271 return;
274 if (ret == 0)
275 block_sigmask(ka, sig);
276 272
277 return ret; 273 block_sigmask(ka, sig);
278} 274}
279 275
280static void do_signal(struct pt_regs *regs) 276static void do_signal(struct pt_regs *regs)
@@ -294,17 +290,7 @@ static void do_signal(struct pt_regs *regs)
294 signr = get_signal_to_deliver(&info, &ka, regs, NULL); 290 signr = get_signal_to_deliver(&info, &ka, regs, NULL);
295 if (signr > 0) { 291 if (signr > 0) {
296 /* Actually deliver the signal. */ 292 /* Actually deliver the signal. */
297 if (handle_signal(signr, &info, &ka, regs) == 0) { 293 handle_signal(signr, &info, &ka, regs);
298 /*
299 * A signal was successfully delivered; the saved
300 * sigmask will have been stored in the signal frame,
301 * and will be restored by sigreturn, so we can simply
302 * clear the TIF_RESTORE_SIGMASK flag.
303 */
304 if (test_thread_flag(TIF_RESTORE_SIGMASK))
305 clear_thread_flag(TIF_RESTORE_SIGMASK);
306 }
307
308 return; 294 return;
309 } 295 }
310 296