From: Cyrill Gorcunov <gorcunov@openvz.org>
To: KOSAKI Motohiro <kosaki.motohiro@gmail.com>
Cc: mtk.manpages@gmail.com, Pavel Emelyanov <xemul@parallels.com>,
linux-man@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
Tejun Heo <tj@kernel.org>, Andrew Morton <akpm@osdl.org>
Subject: Re: Bad error return after find_vma() in PR_SET_MM code
Date: Tue, 24 Apr 2012 19:15:44 +0400 [thread overview]
Message-ID: <20120424151544.GH21224@moon> (raw)
In-Reply-To: <4F96C2CF.5070900@gmail.com>
On Tue, Apr 24, 2012 at 11:12:15AM -0400, KOSAKI Motohiro wrote:
> (4/15/12 12:00 AM), Michael Kerrisk (man-pages) wrote:
> >[Bother! Resending with corrected subject line (was "[PATCH 1/2]
> >prctl: Add PR_SET_MM option description")]
> >
> >Cyrill,
> >
> >While reviewing your patch to the prctl() manual page, I noticed the
> >following code in kernel/sys.c::prctl_set_mm():
> >
> > if (opt != PR_SET_MM_START_BRK&& opt != PR_SET_MM_BRK) {
> > /* It must be existing VMA */
> > if (!vma || vma->vm_start> addr)
> > goto out;
> > }
> >
> >At this point, the code causes an exit with error set to zero (i.e.,
> >success). This looks unintended to me. Is the code correct? I suspect
> >a return of -EFAULT or -ENOMEM is warranted.
>
> EFAULT please when detecting invalid vma.
Thanks for reminder, Kosaki! I'll cook a patch asap.
Cyrill
prev parent reply other threads:[~2012-04-24 15:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-15 4:00 Bad error return after find_vma() in PR_SET_MM code Michael Kerrisk (man-pages)
2012-04-24 15:12 ` KOSAKI Motohiro
2012-04-24 15:15 ` Cyrill Gorcunov [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=20120424151544.GH21224@moon \
--to=gorcunov@openvz.org \
--cc=akpm@osdl.org \
--cc=kosaki.motohiro@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-man@vger.kernel.org \
--cc=mtk.manpages@gmail.com \
--cc=tj@kernel.org \
--cc=xemul@parallels.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