From: Cyrill Gorcunov <gorcunov@openvz.org>
To: kernel-janitors@vger.kernel.org
Subject: Re: [next:akpm 26/413] kernel/sys.c:1868:14: sparse: incorrect type in argument 1 (different base ty
Date: Wed, 26 Sep 2012 20:19:34 +0000 [thread overview]
Message-ID: <20120926201934.GO5749@moon> (raw)
In-Reply-To: <20120926155910.GA14447@localhost>
On Wed, Sep 26, 2012 at 01:05:58PM -0700, Andrew Morton wrote:
> > - if (!access_ok(VERIFY_READ, addr, sizeof(addr)) || addr < mmap_min_addr)
> > + if (!access_ok(VERIFY_READ, (void *)addr, sizeof(addr)) || addr < mmap_min_addr)
> > return -EINVAL;
> >
> > error = -EINVAL;
>
> It should have the __user tag as well, methinks?
>
> --- a/kernel/sys.c~prctl-use-access_ok-instead-of-task_size-in-prctl_set_mm-fix-fix
> +++ a/kernel/sys.c
> @@ -1865,7 +1865,8 @@ static int prctl_set_mm(int opt, unsigne
> if (opt = PR_SET_MM_EXE_FILE)
> return prctl_set_mm_exe_file(mm, (unsigned int)addr);
>
> - if (!access_ok(VERIFY_READ, (void *)addr, sizeof(addr)) || addr < mmap_min_addr)
> + if (!access_ok(VERIFY_READ, (void __user *)addr, sizeof(addr)) ||
> + addr < mmap_min_addr)
> return -EINVAL;
Yeah, i think so. Thanks, Andrew!
next prev parent reply other threads:[~2012-09-26 20:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-26 15:59 [next:akpm 26/413] kernel/sys.c:1868:14: sparse: incorrect type in argument 1 (different base types) Fengguang Wu
2012-09-26 17:08 ` [next:akpm 26/413] kernel/sys.c:1868:14: sparse: incorrect type in argument 1 (different base ty Cyrill Gorcunov
2012-09-26 20:05 ` Andrew Morton
2012-09-26 20:19 ` Cyrill Gorcunov [this message]
2012-09-26 21:06 ` Dan Carpenter
2012-09-26 21:17 ` Andrew Morton
2012-09-26 21:43 ` Cyrill Gorcunov
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=20120926201934.GO5749@moon \
--to=gorcunov@openvz.org \
--cc=kernel-janitors@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.