csky: Fix a size determination in gpr_get()
authorZhenzhong Duan <zhenzhong.duan@gmail.com>
Tue, 22 Sep 2020 09:15:05 +0000 (17:15 +0800)
committerGuo Ren <guoren@linux.alibaba.com>
Tue, 12 Jan 2021 01:52:41 +0000 (09:52 +0800)
"*" is missed  in size determination as we are passing register set
rather than a pointer.

Fixes: dcad7854fcce ("sky: switch to ->regset_get()")
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@gmail.com>
Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
arch/csky/kernel/ptrace.c

index 417b759..0105ac8 100644 (file)
@@ -84,7 +84,7 @@ static int gpr_get(struct task_struct *target,
        /* Abiv1 regs->tls is fake and we need sync here. */
        regs->tls = task_thread_info(target)->tp_value;
 
-       return membuf_write(&to, regs, sizeof(regs));
+       return membuf_write(&to, regs, sizeof(*regs));
 }
 
 static int gpr_set(struct task_struct *target,