From: ebiederm@xmission.com (Eric W. Biederman)
To: Oleg Nesterov <oleg@tv-sign.ru>
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, 06 Dec 2007 10:21:39 -0700 [thread overview]
Message-ID: <m1y7c7spr0.fsf@ebiederm.dsl.xmission.com> (raw)
In-Reply-To: <20071206170145.GA10674@tv-sign.ru> (Oleg Nesterov's message of "Thu, 6 Dec 2007 20:01:45 +0300")
Oleg Nesterov <oleg@tv-sign.ru> writes:
> 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".
Ugh. You are correct. Thanks for the review.
That is one annoying special case.
Eric
next prev parent reply other threads:[~2007-12-06 17:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-06 3:14 Eric W. Biederman
2007-12-06 17:01 ` Oleg Nesterov
2007-12-06 17:21 ` Eric W. Biederman [this message]
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=m1y7c7spr0.fsf@ebiederm.dsl.xmission.com \
--to=ebiederm@xmission.com \
--cc=akpm@linux-foundation.org \
--cc=containers@lists.osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg@tv-sign.ru \
--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
all inboxes | Powered by JetHome®