diff options
Diffstat (limited to 'arch/arm/kernel/signal.c')
-rw-r--r-- | arch/arm/kernel/signal.c | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/arch/arm/kernel/signal.c b/arch/arm/kernel/signal.c index fd2392a17ac1..8756e5dcd377 100644 --- a/arch/arm/kernel/signal.c +++ b/arch/arm/kernel/signal.c | |||
@@ -640,13 +640,24 @@ static void do_signal(struct pt_regs *regs, int syscall) | |||
640 | } | 640 | } |
641 | 641 | ||
642 | asmlinkage void | 642 | asmlinkage void |
643 | do_notify_resume(struct pt_regs *regs, unsigned int thread_flags, int syscall) | 643 | do_work_pending(struct pt_regs *regs, unsigned int thread_flags, int syscall) |
644 | { | 644 | { |
645 | if (thread_flags & _TIF_SIGPENDING) | 645 | do { |
646 | do_signal(regs, syscall); | 646 | if (likely(thread_flags & _TIF_NEED_RESCHED)) { |
647 | 647 | schedule(); | |
648 | if (thread_flags & _TIF_NOTIFY_RESUME) { | 648 | } else { |
649 | clear_thread_flag(TIF_NOTIFY_RESUME); | 649 | if (unlikely(!user_mode(regs))) |
650 | tracehook_notify_resume(regs); | 650 | return; |
651 | } | 651 | local_irq_enable(); |
652 | if (thread_flags & _TIF_SIGPENDING) { | ||
653 | do_signal(regs, syscall); | ||
654 | syscall = 0; | ||
655 | } else { | ||
656 | clear_thread_flag(TIF_NOTIFY_RESUME); | ||
657 | tracehook_notify_resume(regs); | ||
658 | } | ||
659 | } | ||
660 | local_irq_disable(); | ||
661 | thread_flags = current_thread_info()->flags; | ||
662 | } while (thread_flags & _TIF_WORK_MASK); | ||
652 | } | 663 | } |