linux-csky.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] csky: Fix a size determination in gpr_get()
@ 2020-09-22  9:15 Zhenzhong Duan
  2020-09-22 16:29 ` Al Viro
  0 siblings, 1 reply; 11+ messages in thread
From: Zhenzhong Duan @ 2020-09-22  9:15 UTC (permalink / raw)
  To: linux-kernel, linux-csky; +Cc: oleg, guoren, viro, Zhenzhong Duan

"*" 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>
---
 arch/csky/kernel/ptrace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/csky/kernel/ptrace.c b/arch/csky/kernel/ptrace.c
index d822144906ac..a4cf2e2ac15a 100644
--- a/arch/csky/kernel/ptrace.c
+++ b/arch/csky/kernel/ptrace.c
@@ -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,
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-12-24  2:23 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-22  9:15 [PATCH] csky: Fix a size determination in gpr_get() Zhenzhong Duan
2020-09-22 16:29 ` Al Viro
2020-09-23  0:03   ` Guo Ren
2020-09-23  0:23     ` Al Viro
2020-09-23  2:37       ` Guo Ren
2020-09-23  4:52         ` Al Viro
2020-09-25  6:33           ` Guo Ren
2020-12-23  2:31           ` Zhenzhong Duan
2020-12-23 14:57             ` Guo Ren
2020-12-24  2:21               ` Zhenzhong Duan
2020-09-23  2:23   ` Zhenzhong Duan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).