From: Oleg Nesterov <oleg@redhat.com>
To: Andrew Morton <akpm@linux-foundation.org>, Salman <sqazi@google.com>
Cc: mingo@elte.hu, linux-kernel@vger.kernel.org,
peterz@infradead.org, tytso@google.com,
torvalds@linux-foundation.org, walken@google.com
Subject: [PATCH 0/1] (Was: Fix a race in pid generation that causes pids to be reused immediately.)
Date: Tue, 15 Jun 2010 20:35:25 +0200 [thread overview]
Message-ID: <20100615183525.GA24577@redhat.com> (raw)
In-Reply-To: <20100611224902.5039.60134.stgit@bumblebee1.mtv.corp.google.com>
On 06/11, Salman wrote:
>
> A program that repeatedly forks and waits is susceptible to having the
> same pid repeated,
I agree this patch should fix this.
But the kernel still can use the same pid twice in a row, I am wondering
if there a simple solution to prevent this. Probably not, and this case
is unlikely.
While we are here, and given that many reviewers recently inspected
alloc_pidmap(), probably someone can explain the mysterious checks
in do/while loop ?
See the patch I am going to send, it is on top on Salman's fix but doesn't
really depend on it.
Oleg.
next prev parent reply other threads:[~2010-06-15 18:37 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-11 17:17 [PATCH] Fix a race in pid generation that causes pids to be reused immediately Salman
2010-06-11 17:44 ` Linus Torvalds
2010-06-11 22:49 ` Salman
2010-06-11 23:07 ` Linus Torvalds
2010-06-14 23:58 ` Andrew Morton
2010-06-15 0:56 ` tytso
2010-06-15 1:55 ` Andrew Morton
2010-06-15 3:26 ` Paul Mackerras
2010-06-15 4:21 ` Andrew Morton
2010-06-15 4:38 ` Eric Dumazet
2010-06-15 6:57 ` Benjamin Herrenschmidt
2010-06-15 7:25 ` Paul Mackerras
2010-06-15 12:56 ` tytso
2010-06-15 13:06 ` Kyle McMartin
2010-06-15 14:35 ` Peter Zijlstra
2010-06-15 19:37 ` Andrew Morton
2010-06-15 18:35 ` Oleg Nesterov [this message]
2010-06-15 18:35 ` [PATCH 1/1] pids: alloc_pidmap: remove the unnecessary boundary checks Oleg Nesterov
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=20100615183525.GA24577@redhat.com \
--to=oleg@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=sqazi@google.com \
--cc=torvalds@linux-foundation.org \
--cc=tytso@google.com \
--cc=walken@google.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