diff options
Diffstat (limited to 'arch/x86/kernel/signal_32.c')
-rw-r--r-- | arch/x86/kernel/signal_32.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/arch/x86/kernel/signal_32.c b/arch/x86/kernel/signal_32.c index 8e05e7f7bd40..d92373630963 100644 --- a/arch/x86/kernel/signal_32.c +++ b/arch/x86/kernel/signal_32.c | |||
@@ -57,7 +57,7 @@ sys_sigsuspend(int history0, int history1, old_sigset_t mask) | |||
57 | 57 | ||
58 | current->state = TASK_INTERRUPTIBLE; | 58 | current->state = TASK_INTERRUPTIBLE; |
59 | schedule(); | 59 | schedule(); |
60 | set_thread_flag(TIF_RESTORE_SIGMASK); | 60 | set_restore_sigmask(); |
61 | 61 | ||
62 | return -ERESTARTNOHAND; | 62 | return -ERESTARTNOHAND; |
63 | } | 63 | } |
@@ -593,7 +593,7 @@ static void do_signal(struct pt_regs *regs) | |||
593 | if (!user_mode(regs)) | 593 | if (!user_mode(regs)) |
594 | return; | 594 | return; |
595 | 595 | ||
596 | if (test_thread_flag(TIF_RESTORE_SIGMASK)) | 596 | if (current_thread_info()->status & TS_RESTORE_SIGMASK) |
597 | oldset = ¤t->saved_sigmask; | 597 | oldset = ¤t->saved_sigmask; |
598 | else | 598 | else |
599 | oldset = ¤t->blocked; | 599 | oldset = ¤t->blocked; |
@@ -612,13 +612,12 @@ static void do_signal(struct pt_regs *regs) | |||
612 | /* Whee! Actually deliver the signal. */ | 612 | /* Whee! Actually deliver the signal. */ |
613 | if (handle_signal(signr, &info, &ka, oldset, regs) == 0) { | 613 | if (handle_signal(signr, &info, &ka, oldset, regs) == 0) { |
614 | /* | 614 | /* |
615 | * a signal was successfully delivered; the saved | 615 | * A signal was successfully delivered; the saved |
616 | * sigmask will have been stored in the signal frame, | 616 | * sigmask will have been stored in the signal frame, |
617 | * and will be restored by sigreturn, so we can simply | 617 | * and will be restored by sigreturn, so we can simply |
618 | * clear the TIF_RESTORE_SIGMASK flag | 618 | * clear the TS_RESTORE_SIGMASK flag. |
619 | */ | 619 | */ |
620 | if (test_thread_flag(TIF_RESTORE_SIGMASK)) | 620 | current_thread_info()->status &= ~TS_RESTORE_SIGMASK; |
621 | clear_thread_flag(TIF_RESTORE_SIGMASK); | ||
622 | } | 621 | } |
623 | return; | 622 | return; |
624 | } | 623 | } |
@@ -645,8 +644,8 @@ static void do_signal(struct pt_regs *regs) | |||
645 | * If there's no signal to deliver, we just put the saved sigmask | 644 | * If there's no signal to deliver, we just put the saved sigmask |
646 | * back. | 645 | * back. |
647 | */ | 646 | */ |
648 | if (test_thread_flag(TIF_RESTORE_SIGMASK)) { | 647 | if (current_thread_info()->status & TS_RESTORE_SIGMASK) { |
649 | clear_thread_flag(TIF_RESTORE_SIGMASK); | 648 | current_thread_info()->status &= ~TS_RESTORE_SIGMASK; |
650 | sigprocmask(SIG_SETMASK, ¤t->saved_sigmask, NULL); | 649 | sigprocmask(SIG_SETMASK, ¤t->saved_sigmask, NULL); |
651 | } | 650 | } |
652 | } | 651 | } |
@@ -665,7 +664,7 @@ do_notify_resume(struct pt_regs *regs, void *unused, __u32 thread_info_flags) | |||
665 | } | 664 | } |
666 | 665 | ||
667 | /* deal with pending signal delivery */ | 666 | /* deal with pending signal delivery */ |
668 | if (thread_info_flags & (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK)) | 667 | if (thread_info_flags & _TIF_SIGPENDING) |
669 | do_signal(regs); | 668 | do_signal(regs); |
670 | 669 | ||
671 | if (thread_info_flags & _TIF_HRTICK_RESCHED) | 670 | if (thread_info_flags & _TIF_HRTICK_RESCHED) |