From: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
To: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] MIPS: sibyte: Add missing __user annotations in sb_tbprof.c
Date: Tue, 22 Feb 2022 09:46:48 +0100 [thread overview]
Message-ID: <20220222084648.GA7123@alpha.franken.de> (raw)
In-Reply-To: <20220217142117.107976-1-tsbogend@alpha.franken.de>
On Thu, Feb 17, 2022 at 03:21:17PM +0100, Thomas Bogendoerfer wrote:
> Add missing __user annotations to fix sparse errors.
>
> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
> ---
> arch/mips/sibyte/common/sb_tbprof.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/arch/mips/sibyte/common/sb_tbprof.c b/arch/mips/sibyte/common/sb_tbprof.c
> index f80d7a710333..bc47681e825a 100644
> --- a/arch/mips/sibyte/common/sb_tbprof.c
> +++ b/arch/mips/sibyte/common/sb_tbprof.c
> @@ -437,13 +437,13 @@ static int sbprof_tb_release(struct inode *inode, struct file *filp)
> return 0;
> }
>
> -static ssize_t sbprof_tb_read(struct file *filp, char *buf,
> +static ssize_t sbprof_tb_read(struct file *filp, char __user *buf,
> size_t size, loff_t *offp)
> {
> int cur_sample, sample_off, cur_count, sample_left;
> char *src;
> int count = 0;
> - char *dest = buf;
> + char __user *dest = buf;
> long cur_off = *offp;
>
> if (!access_ok(buf, size))
> @@ -512,7 +512,7 @@ static long sbprof_tb_ioctl(struct file *filp,
> if (err)
> break;
>
> - err = put_user(TB_FULL, (int *) arg);
> + err = put_user(TB_FULL, (int __user *) arg);
> break;
> }
>
> --
> 2.29.2
applied to mips-next.
Thomas.
--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]
prev parent reply other threads:[~2022-02-22 8:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-17 14:21 Thomas Bogendoerfer
2022-02-22 8:46 ` Thomas Bogendoerfer [this message]
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=20220222084648.GA7123@alpha.franken.de \
--to=tsbogend@alpha.franken.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
/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
all inboxes | Powered by JetHome®