]> git.ipfire.org Git - thirdparty/kernel/stable.git/blobdiff - arch/ia64/kernel/ptrace.c
sched: Change task_struct::state
[thirdparty/kernel/stable.git] / arch / ia64 / kernel / ptrace.c
index e14f5653393ac865ffd0f144352befec2f932c74..df28c7dd164f5a78c4de836fda45bf4041d61c32 100644 (file)
@@ -641,11 +641,11 @@ ptrace_attach_sync_user_rbs (struct task_struct *child)
        read_lock(&tasklist_lock);
        if (child->sighand) {
                spin_lock_irq(&child->sighand->siglock);
-               if (child->state == TASK_STOPPED &&
+               if (READ_ONCE(child->__state) == TASK_STOPPED &&
                    !test_and_set_tsk_thread_flag(child, TIF_RESTORE_RSE)) {
                        set_notify_resume(child);
 
-                       child->state = TASK_TRACED;
+                       WRITE_ONCE(child->__state, TASK_TRACED);
                        stopped = 1;
                }
                spin_unlock_irq(&child->sighand->siglock);
@@ -665,9 +665,9 @@ ptrace_attach_sync_user_rbs (struct task_struct *child)
        read_lock(&tasklist_lock);
        if (child->sighand) {
                spin_lock_irq(&child->sighand->siglock);
-               if (child->state == TASK_TRACED &&
+               if (READ_ONCE(child->__state) == TASK_TRACED &&
                    (child->signal->flags & SIGNAL_STOP_STOPPED)) {
-                       child->state = TASK_STOPPED;
+                       WRITE_ONCE(child->__state, TASK_STOPPED);
                }
                spin_unlock_irq(&child->sighand->siglock);
        }