diff options
Diffstat (limited to 'arch/x86/kernel/signal_32.c')
-rw-r--r-- | arch/x86/kernel/signal_32.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/arch/x86/kernel/signal_32.c b/arch/x86/kernel/signal_32.c index 0c727f64e79b..2a2435d3037d 100644 --- a/arch/x86/kernel/signal_32.c +++ b/arch/x86/kernel/signal_32.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/errno.h> | 17 | #include <linux/errno.h> |
18 | #include <linux/sched.h> | 18 | #include <linux/sched.h> |
19 | #include <linux/wait.h> | 19 | #include <linux/wait.h> |
20 | #include <linux/tracehook.h> | ||
20 | #include <linux/elf.h> | 21 | #include <linux/elf.h> |
21 | #include <linux/smp.h> | 22 | #include <linux/smp.h> |
22 | #include <linux/mm.h> | 23 | #include <linux/mm.h> |
@@ -559,8 +560,6 @@ handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka, | |||
559 | * handler too. | 560 | * handler too. |
560 | */ | 561 | */ |
561 | regs->flags &= ~X86_EFLAGS_TF; | 562 | regs->flags &= ~X86_EFLAGS_TF; |
562 | if (test_thread_flag(TIF_SINGLESTEP)) | ||
563 | ptrace_notify(SIGTRAP); | ||
564 | 563 | ||
565 | spin_lock_irq(¤t->sighand->siglock); | 564 | spin_lock_irq(¤t->sighand->siglock); |
566 | sigorsets(¤t->blocked, ¤t->blocked, &ka->sa.sa_mask); | 565 | sigorsets(¤t->blocked, ¤t->blocked, &ka->sa.sa_mask); |
@@ -569,6 +568,9 @@ handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka, | |||
569 | recalc_sigpending(); | 568 | recalc_sigpending(); |
570 | spin_unlock_irq(¤t->sighand->siglock); | 569 | spin_unlock_irq(¤t->sighand->siglock); |
571 | 570 | ||
571 | tracehook_signal_handler(sig, info, ka, regs, | ||
572 | test_thread_flag(TIF_SINGLESTEP)); | ||
573 | |||
572 | return 0; | 574 | return 0; |
573 | } | 575 | } |
574 | 576 | ||
@@ -662,5 +664,10 @@ do_notify_resume(struct pt_regs *regs, void *unused, __u32 thread_info_flags) | |||
662 | if (thread_info_flags & _TIF_SIGPENDING) | 664 | if (thread_info_flags & _TIF_SIGPENDING) |
663 | do_signal(regs); | 665 | do_signal(regs); |
664 | 666 | ||
667 | if (thread_info_flags & _TIF_NOTIFY_RESUME) { | ||
668 | clear_thread_flag(TIF_NOTIFY_RESUME); | ||
669 | tracehook_notify_resume(regs); | ||
670 | } | ||
671 | |||
665 | clear_thread_flag(TIF_IRET); | 672 | clear_thread_flag(TIF_IRET); |
666 | } | 673 | } |