From: Oleg Nesterov <oleg@redhat.com>
To: Chen Gang <gang.chen@asianux.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>,
Serge Hallyn <serge.hallyn@canonical.com>,
"Serge E. Hallyn" <serge@hallyn.com>,
Andrew Morton <akpm@linux-foundation.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] kernel/pid.c: check pid whether be NULL in __change_pid()
Date: Mon, 7 Oct 2013 14:43:19 +0200 [thread overview]
Message-ID: <20131007124319.GA24450@redhat.com> (raw)
In-Reply-To: <52528CF7.8050405@asianux.com>
On 10/07, Chen Gang wrote:
>
> Within __change_pid(), 'new' may be NULL if it comes from detach_pid(),
> and 'link->pid' also may be NULL ("link->pid = new"), so theoretically,\
> the original 'link->pid' may be NULL, too.
I don't really understand this "theoretically",
> In real world, at least now, all callers which will call detach_pid()
> or change_pid() will not cause issue,
Yes,
> but still recommend to check it
> in __change_pid() to let itself consistency.
Why?
Contrary, I think we should not hide the problem. If __change_pid() is
called when task->pids[type].pid is already NULL there is something
seriously wrong.
Oleg.
next prev parent reply other threads:[~2013-10-07 12:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-07 10:29 [PATCH] kernel/pid.c: check pid whether be NULL in __change_pid() Chen Gang
2013-10-07 12:43 ` Oleg Nesterov [this message]
2013-10-07 21:53 ` Chen Gang
2013-10-08 17:56 ` Oleg Nesterov
2013-10-09 1:03 ` Chen Gang
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=20131007124319.GA24450@redhat.com \
--to=oleg@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=ebiederm@xmission.com \
--cc=gang.chen@asianux.com \
--cc=linux-kernel@vger.kernel.org \
--cc=serge.hallyn@canonical.com \
--cc=serge@hallyn.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;
as well as URLs for NNTP newsgroup(s).