diff options
author | Roland McGrath <roland@redhat.com> | 2008-01-26 08:11:22 -0500 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2008-01-26 08:11:27 -0500 |
commit | 0ac30be461084f30ad6e22c6b91347e880ed41aa (patch) | |
tree | 1e157c413e8495ea66700d02d055bfcbe7d4fe71 /arch/s390/kernel/signal.c | |
parent | ea29ee16e6ea908c830e70516d440828fd9129a8 (diff) |
[S390] single-step cleanup
Signed-off-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel/signal.c')
-rw-r--r-- | arch/s390/kernel/signal.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/arch/s390/kernel/signal.c b/arch/s390/kernel/signal.c index d264671c1b71..4449bf32cbf1 100644 --- a/arch/s390/kernel/signal.c +++ b/arch/s390/kernel/signal.c | |||
@@ -471,6 +471,7 @@ void do_signal(struct pt_regs *regs) | |||
471 | 471 | ||
472 | if (signr > 0) { | 472 | if (signr > 0) { |
473 | /* Whee! Actually deliver the signal. */ | 473 | /* Whee! Actually deliver the signal. */ |
474 | int ret; | ||
474 | #ifdef CONFIG_COMPAT | 475 | #ifdef CONFIG_COMPAT |
475 | if (test_thread_flag(TIF_31BIT)) { | 476 | if (test_thread_flag(TIF_31BIT)) { |
476 | extern int handle_signal32(unsigned long sig, | 477 | extern int handle_signal32(unsigned long sig, |
@@ -478,15 +479,12 @@ void do_signal(struct pt_regs *regs) | |||
478 | siginfo_t *info, | 479 | siginfo_t *info, |
479 | sigset_t *oldset, | 480 | sigset_t *oldset, |
480 | struct pt_regs *regs); | 481 | struct pt_regs *regs); |
481 | if (handle_signal32( | 482 | ret = handle_signal32(signr, &ka, &info, oldset, regs); |
482 | signr, &ka, &info, oldset, regs) == 0) { | ||
483 | if (test_thread_flag(TIF_RESTORE_SIGMASK)) | ||
484 | clear_thread_flag(TIF_RESTORE_SIGMASK); | ||
485 | } | ||
486 | return; | ||
487 | } | 483 | } |
484 | else | ||
488 | #endif | 485 | #endif |
489 | if (handle_signal(signr, &ka, &info, oldset, regs) == 0) { | 486 | ret = handle_signal(signr, &ka, &info, oldset, regs); |
487 | if (!ret) { | ||
490 | /* | 488 | /* |
491 | * A signal was successfully delivered; the saved | 489 | * A signal was successfully delivered; the saved |
492 | * sigmask will have been stored in the signal frame, | 490 | * sigmask will have been stored in the signal frame, |
@@ -495,6 +493,14 @@ void do_signal(struct pt_regs *regs) | |||
495 | */ | 493 | */ |
496 | if (test_thread_flag(TIF_RESTORE_SIGMASK)) | 494 | if (test_thread_flag(TIF_RESTORE_SIGMASK)) |
497 | clear_thread_flag(TIF_RESTORE_SIGMASK); | 495 | clear_thread_flag(TIF_RESTORE_SIGMASK); |
496 | |||
497 | /* | ||
498 | * If we would have taken a single-step trap | ||
499 | * for a normal instruction, act like we took | ||
500 | * one for the handler setup. | ||
501 | */ | ||
502 | if (current->thread.per_info.single_step) | ||
503 | set_thread_flag(TIF_SINGLE_STEP); | ||
498 | } | 504 | } |
499 | return; | 505 | return; |
500 | } | 506 | } |