Ignore:
Timestamp:
Apr 21, 2017, 4:28:29 AM (5 weeks ago)
Author:
brainslayer
Message:

update

File:
1 edited

Legend:

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

    r29492 r31885  
    145145        WARN_ON(!task->ptrace || task->parent != current);
    146146
     147        /*
     148         * PTRACE_LISTEN can allow ptrace_trap_notify to wake us up remotely.
     149         * Recheck state under the lock to close this race.
     150         */
    147151        spin_lock_irq(&task->sighand->siglock);
    148         if (__fatal_signal_pending(task))
    149                 wake_up_state(task, __TASK_TRACED);
    150         else
    151                 task->state = TASK_TRACED;
     152        if (task->state == __TASK_TRACED) {
     153                if (__fatal_signal_pending(task))
     154                        wake_up_state(task, __TASK_TRACED);
     155                else
     156                        task->state = TASK_TRACED;
     157        }
    152158        spin_unlock_irq(&task->sighand->siglock);
    153159}
Note: See TracChangeset for help on using the changeset viewer.