]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - kernel/signal.c
Merge tag 'cris-for-linus-3.7' of git://jni.nu/cris
[mirror_ubuntu-bionic-kernel.git] / kernel / signal.c
index be4f856d52f81bab8184544b5dd6dd9b823bc21b..2c681f11b7d24b9deab0e7b4a7c1498f11a23b16 100644 (file)
@@ -1971,13 +1971,8 @@ static void ptrace_do_notify(int signr, int exit_code, int why)
 void ptrace_notify(int exit_code)
 {
        BUG_ON((exit_code & (0x7f | ~0xffff)) != SIGTRAP);
-       if (unlikely(current->task_works)) {
-               if (test_and_clear_ti_thread_flag(current_thread_info(),
-                                                  TIF_NOTIFY_RESUME)) {
-                       smp_mb__after_clear_bit();
-                       task_work_run();
-               }
-       }
+       if (unlikely(current->task_works))
+               task_work_run();
 
        spin_lock_irq(&current->sighand->siglock);
        ptrace_do_notify(SIGTRAP, exit_code, CLD_TRAPPED);
@@ -2198,13 +2193,8 @@ int get_signal_to_deliver(siginfo_t *info, struct k_sigaction *return_ka,
        struct signal_struct *signal = current->signal;
        int signr;
 
-       if (unlikely(current->task_works)) {
-               if (test_and_clear_ti_thread_flag(current_thread_info(),
-                                                  TIF_NOTIFY_RESUME)) {
-                       smp_mb__after_clear_bit();
-                       task_work_run();
-               }
-       }
+       if (unlikely(current->task_works))
+               task_work_run();
 
        if (unlikely(uprobe_deny_signal()))
                return 0;