From: KOSAKI Motohiro <kosaki.motohiro-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Cc: Cyrill Gorcunov
<gorcunov-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>,
Pavel Emelyanov <xemul-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>,
linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
LKML <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Andrew Morton <akpm-3NddpPZAyC0@public.gmane.org>,
kosaki.motohiro-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
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-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
(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.
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
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: 5+ 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)
[not found] ` <CAKgNAkjWdy_SYaJsNXUOv7cNL2xwZNW7FCdRsT6wiRFb0dmetw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-04-24 15:12 ` KOSAKI Motohiro [this message]
2012-04-24 15:12 ` KOSAKI Motohiro
[not found] ` <4F96C2CF.5070900-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-04-24 15:15 ` Cyrill Gorcunov
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-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=akpm-3NddpPZAyC0@public.gmane.org \
--cc=gorcunov-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=xemul-bzQdu9zFT3WakBO8gow8eQ@public.gmane.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.