Merge tag 'sched-core-2021-06-28' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-microblaze.git] / lib / syscall.c
index ba13e92..006e256 100644 (file)
@@ -68,13 +68,13 @@ static int collect_syscall(struct task_struct *target, struct syscall_info *info
  */
 int task_current_syscall(struct task_struct *target, struct syscall_info *info)
 {
-       long state;
        unsigned long ncsw;
+       unsigned int state;
 
        if (target == current)
                return collect_syscall(target, info);
 
-       state = target->state;
+       state = READ_ONCE(target->__state);
        if (unlikely(!state))
                return -EAGAIN;