From: KOSAKI Motohiro <kosaki.motohiro@gmail.com>
To: mtk.manpages@gmail.com
Cc: Cyrill Gorcunov <gorcunov@openvz.org>,
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>,
kosaki.motohiro@gmail.com
Subject: Re: Bad error return after find_vma() in PR_SET_MM code
Date: Tue, 24 Apr 2012 11:12:15 -0400 [thread overview]
Message-ID: <4F96C2CF.5070900@gmail.com> (raw)
In-Reply-To: <CAKgNAkjWdy_SYaJsNXUOv7cNL2xwZNW7FCdRsT6wiRFb0dmetw@mail.gmail.com>
(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.
next prev parent reply other threads:[~2012-04-24 15:12 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 [this message]
2012-04-24 15:15 ` 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=4F96C2CF.5070900@gmail.com \
--to=kosaki.motohiro@gmail.com \
--cc=akpm@osdl.org \
--cc=gorcunov@openvz.org \
--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