aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390/kernel')
-rw-r--r--arch/s390/kernel/compat_signal.c10
-rw-r--r--arch/s390/kernel/entry.h2
-rw-r--r--arch/s390/kernel/signal.c32
3 files changed, 19 insertions, 25 deletions
diff --git a/arch/s390/kernel/compat_signal.c b/arch/s390/kernel/compat_signal.c
index 377c096ca4a7..233db1d68eee 100644
--- a/arch/s390/kernel/compat_signal.c
+++ b/arch/s390/kernel/compat_signal.c
@@ -572,7 +572,7 @@ give_sigsegv:
572 * OK, we're invoking a handler 572 * OK, we're invoking a handler
573 */ 573 */
574 574
575int handle_signal32(unsigned long sig, struct k_sigaction *ka, 575void handle_signal32(unsigned long sig, struct k_sigaction *ka,
576 siginfo_t *info, sigset_t *oldset, struct pt_regs *regs) 576 siginfo_t *info, sigset_t *oldset, struct pt_regs *regs)
577{ 577{
578 int ret; 578 int ret;
@@ -583,8 +583,12 @@ int handle_signal32(unsigned long sig, struct k_sigaction *ka,
583 else 583 else
584 ret = setup_frame32(sig, ka, oldset, regs); 584 ret = setup_frame32(sig, ka, oldset, regs);
585 if (ret) 585 if (ret)
586 return ret; 586 return;
587 block_sigmask(ka, sig); 587 block_sigmask(ka, sig);
588 return 0; 588 /*
589 * Let tracing know that we've done the handler setup.
590 */
591 tracehook_signal_handler(sig, info, ka, regs,
592 test_thread_flag(TIF_SINGLE_STEP));
589} 593}
590 594
diff --git a/arch/s390/kernel/entry.h b/arch/s390/kernel/entry.h
index 6cdddac93a2e..f66a229ab0b3 100644
--- a/arch/s390/kernel/entry.h
+++ b/arch/s390/kernel/entry.h
@@ -31,7 +31,7 @@ void do_per_trap(struct pt_regs *regs);
31void syscall_trace(struct pt_regs *regs, int entryexit); 31void syscall_trace(struct pt_regs *regs, int entryexit);
32void kernel_stack_overflow(struct pt_regs * regs); 32void kernel_stack_overflow(struct pt_regs * regs);
33void do_signal(struct pt_regs *regs); 33void do_signal(struct pt_regs *regs);
34int handle_signal32(unsigned long sig, struct k_sigaction *ka, 34void handle_signal32(unsigned long sig, struct k_sigaction *ka,
35 siginfo_t *info, sigset_t *oldset, struct pt_regs *regs); 35 siginfo_t *info, sigset_t *oldset, struct pt_regs *regs);
36void do_notify_resume(struct pt_regs *regs); 36void do_notify_resume(struct pt_regs *regs);
37 37
diff --git a/arch/s390/kernel/signal.c b/arch/s390/kernel/signal.c
index c880c48a09f3..7f9a862a161a 100644
--- a/arch/s390/kernel/signal.c
+++ b/arch/s390/kernel/signal.c
@@ -367,7 +367,7 @@ give_sigsegv:
367 return -EFAULT; 367 return -EFAULT;
368} 368}
369 369
370static int handle_signal(unsigned long sig, struct k_sigaction *ka, 370static void handle_signal(unsigned long sig, struct k_sigaction *ka,
371 siginfo_t *info, sigset_t *oldset, 371 siginfo_t *info, sigset_t *oldset,
372 struct pt_regs *regs) 372 struct pt_regs *regs)
373{ 373{
@@ -379,9 +379,13 @@ static int handle_signal(unsigned long sig, struct k_sigaction *ka,
379 else 379 else
380 ret = setup_frame(sig, ka, oldset, regs); 380 ret = setup_frame(sig, ka, oldset, regs);
381 if (ret) 381 if (ret)
382 return ret; 382 return;
383 block_sigmask(ka, sig); 383 block_sigmask(ka, sig);
384 return 0; 384 /*
385 * Let tracing know that we've done the handler setup.
386 */
387 tracehook_signal_handler(sig, info, ka, regs,
388 test_thread_flag(TIF_SINGLE_STEP));
385} 389}
386 390
387/* 391/*
@@ -436,24 +440,10 @@ void do_signal(struct pt_regs *regs)
436 /* No longer in a system call */ 440 /* No longer in a system call */
437 clear_thread_flag(TIF_SYSCALL); 441 clear_thread_flag(TIF_SYSCALL);
438 442
439 if ((is_compat_task() ? 443 if (is_compat_task())
440 handle_signal32(signr, &ka, &info, oldset, regs) : 444 handle_signal32(signr, &ka, &info, oldset, regs);
441 handle_signal(signr, &ka, &info, oldset, regs)) == 0) { 445 else
442 /* 446 handle_signal(signr, &ka, &info, oldset, regs);
443 * A signal was successfully delivered; the saved
444 * sigmask will have been stored in the signal frame,
445 * and will be restored by sigreturn, so we can simply
446 * clear the TIF_RESTORE_SIGMASK flag.
447 */
448 if (test_thread_flag(TIF_RESTORE_SIGMASK))
449 clear_thread_flag(TIF_RESTORE_SIGMASK);
450
451 /*
452 * Let tracing know that we've done the handler setup.
453 */
454 tracehook_signal_handler(signr, &info, &ka, regs,
455 test_thread_flag(TIF_SINGLE_STEP));
456 }
457 return; 447 return;
458 } 448 }
459 449