From: Cong Wang <xiyou.wangcong@gmail.com>
To: Christopher Yeoh <cyeoh@au1.ibm.com>
Cc: Oleg Nesterov <oleg@redhat.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH RESEND] Fix race in process_vm_rw_core
Date: Wed, 01 Feb 2012 14:09:51 +0800 [thread overview]
Message-ID: <4F28D72F.8060505@gmail.com> (raw)
In-Reply-To: <20120201162330.43d421d3@Gantu.yeoh.info>
On 02/01/2012 01:53 PM, Christopher Yeoh wrote:
> + mm = mm_access(task, PTRACE_MODE_ATTACH);
> + if (!mm || IS_ERR(mm)) {
> + if (!mm)
> + rc = -EINVAL;
> + else
> + rc = -EPERM;
> goto put_task_struct;
If IS_ERR(mm), you need to return PTR_ERR(mm), rather than -EPERM.
And, is -EINVAL proper for !mm case? For me, -ENOENT is better.
next prev parent reply other threads:[~2012-02-01 6:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-30 2:14 [PATCH RESEND] Fix race in process_vm_rw_core Christopher Yeoh
2012-01-30 15:09 ` Oleg Nesterov
2012-02-01 5:53 ` Christopher Yeoh
2012-02-01 6:09 ` Cong Wang [this message]
2012-02-01 6:10 ` Linus Torvalds
2012-02-01 8:08 ` Christopher Yeoh
2012-02-02 1:04 ` Christopher Yeoh
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=4F28D72F.8060505@gmail.com \
--to=xiyou.wangcong@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=cyeoh@au1.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg@redhat.com \
--cc=torvalds@linux-foundation.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.