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

kernel update

File:
1 edited

Legend:

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

    r31102 r31859  
    152152        WARN_ON(!task->ptrace || task->parent != current);
    153153
     154        /*
     155         * PTRACE_LISTEN can allow ptrace_trap_notify to wake us up remotely.
     156         * Recheck state under the lock to close this race.
     157         */
    154158        spin_lock_irq(&task->sighand->siglock);
    155         if (__fatal_signal_pending(task))
    156                 wake_up_state(task, __TASK_TRACED);
    157         else
    158                 task->state = TASK_TRACED;
     159        if (task->state == __TASK_TRACED) {
     160                if (__fatal_signal_pending(task))
     161                        wake_up_state(task, __TASK_TRACED);
     162                else
     163                        task->state = TASK_TRACED;
     164        }
    159165        spin_unlock_irq(&task->sighand->siglock);
    160166}
Note: See TracChangeset for help on using the changeset viewer.