]> Git Repo - linux.git/blobdiff - lib/syscall.c
net: phy: micrel: Fix detection of ksz87xx switch
[linux.git] / lib / syscall.c
index 8533d2fea2d711aafbca366c880848ef2b99be9b..006e256d22644ddce63e88d63affd29137d87f46 100644 (file)
@@ -7,6 +7,7 @@
 
 static int collect_syscall(struct task_struct *target, struct syscall_info *info)
 {
+       unsigned long args[6] = { };
        struct pt_regs *regs;
 
        if (!try_get_task_stack(target)) {
@@ -27,8 +28,14 @@ static int collect_syscall(struct task_struct *target, struct syscall_info *info
 
        info->data.nr = syscall_get_nr(target, regs);
        if (info->data.nr != -1L)
-               syscall_get_arguments(target, regs,
-                                     (unsigned long *)&info->data.args[0]);
+               syscall_get_arguments(target, regs, args);
+
+       info->data.args[0] = args[0];
+       info->data.args[1] = args[1];
+       info->data.args[2] = args[2];
+       info->data.args[3] = args[3];
+       info->data.args[4] = args[4];
+       info->data.args[5] = args[5];
 
        put_task_stack(target);
        return 0;
@@ -61,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;
 
This page took 0.035001 seconds and 4 git commands to generate.