Ignore:
Timestamp:
Apr 14, 2017, 9:41:36 PM (4 months ago)
Author:
brainslayer
Message:

kernel update

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/linux/universal/linux-4.9/kernel/ptrace.c

    r31574 r31859  
    182182        WARN_ON(!task->ptrace || task->parent != current);
    183183
     184        /*
     185         * PTRACE_LISTEN can allow ptrace_trap_notify to wake us up remotely.
     186         * Recheck state under the lock to close this race.
     187         */
    184188        spin_lock_irq(&task->sighand->siglock);
    185         if (__fatal_signal_pending(task))
    186                 wake_up_state(task, __TASK_TRACED);
    187         else
    188                 task->state = TASK_TRACED;
     189        if (task->state == __TASK_TRACED) {
     190                if (__fatal_signal_pending(task))
     191                        wake_up_state(task, __TASK_TRACED);
     192                else
     193                        task->state = TASK_TRACED;
     194        }
    189195        spin_unlock_irq(&task->sighand->siglock);
    190196}
Note: See TracChangeset for help on using the changeset viewer.