diff options
Diffstat (limited to 'arch/score/kernel/signal.c')
-rw-r--r-- | arch/score/kernel/signal.c | 24 |
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 | ||
244 | static int handle_signal(unsigned long sig, siginfo_t *info, | 244 | static 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 | ||
280 | static void do_signal(struct pt_regs *regs) | 276 | static 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 | ||