From: Al Viro <viro@zeniv.linux.org.uk>
To: Zhenzhong Duan <zhenzhong.duan@gmail.com>
Cc: linux-kernel@vger.kernel.org, linux-csky@vger.kernel.org,
oleg@redhat.com, guoren@kernel.org
Subject: Re: [PATCH] csky: Fix a size determination in gpr_get()
Date: Tue, 22 Sep 2020 17:29:01 +0100 [thread overview]
Message-ID: <20200922162901.GA3421308@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20200922091505.471-1-zhenzhong.duan@gmail.com>
On Tue, Sep 22, 2020 at 05:15:05PM +0800, Zhenzhong Duan wrote:
> "*" is missed in size determination as we are passing register set
> rather than a pointer.
Ack. I can push it to Linus today, unless you want it to go through
csky tree. Preferences?
> 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
>
next prev parent reply other threads:[~2020-09-22 16:29 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-22 9:15 [PATCH] csky: Fix a size determination in gpr_get() Zhenzhong Duan
2020-09-22 16:29 ` Al Viro [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200922162901.GA3421308@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=guoren@kernel.org \
--cc=linux-csky@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg@redhat.com \
--cc=zhenzhong.duan@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).