From: Oleg Nesterov <oleg@tv-sign.ru>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org,
Linux Containers <containers@lists.osdl.org>,
Pavel Emelyanov <xemul@openvz.org>,
sukadev@us.ibm.com
Subject: Re: [PATCH] pid: sys_wait... fixes
Date: Thu, 6 Dec 2007 20:01:45 +0300 [thread overview]
Message-ID: <20071206170145.GA10674@tv-sign.ru> (raw)
In-Reply-To: <m17ijsv7iu.fsf@ebiederm.dsl.xmission.com>
On 12/05, Eric W. Biederman wrote:
>
> This modifies do_wait and eligible_child to take a pair of
> enum pid_type and struct pid *pid to precisely specify what
> set of processes are eligible to be waited for, instead of the
> raw pid_t value from sys_wait4.
Personally, I like this patch very much. Not only it fixes the bug,
in my opinion it also makes the code more clean.
However at first glance it has a minor fixable problem,
> + if (type < PIDTYPE_MAX) {
> + if (p->pids[type].pid != pid)
> return 0;
> }
If type != PIDTYPE_PID we can't trust p->pids[type].pid unless p is a
group leader. This .pid could be just a "random value".
Oleg.
next prev parent reply other threads:[~2007-12-06 17:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-06 3:14 [PATCH] pid: sys_wait... fixes Eric W. Biederman
2007-12-06 17:01 ` Oleg Nesterov [this message]
2007-12-06 17:21 ` Eric W. Biederman
2007-12-06 18:20 ` [PATCH] pid: sys_wait... fixes (v2) Eric W. Biederman
2007-12-06 18:45 ` Oleg Nesterov
2007-12-06 19:11 ` Eric W. Biederman
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=20071206170145.GA10674@tv-sign.ru \
--to=oleg@tv-sign.ru \
--cc=akpm@linux-foundation.org \
--cc=containers@lists.osdl.org \
--cc=ebiederm@xmission.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sukadev@us.ibm.com \
--cc=xemul@openvz.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 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).