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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 4 Mar 2021 10:38:21 +0000 (11:38 +0100)
[ Upstream commit 8bfb676492da208bd6dde0f22dff79840dbb5051 ]

"*" 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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/csky/kernel/ptrace.c

index d822144..a4cf2e2 100644 (file)
@@ -83,7 +83,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,