Re: [PATCH] Fix a race in pid generation that causes pids to be reused immediately.

Salman Qazi
2010-06-09T18:09:57Z

On Wed, Jun 9, 2010 at 10:47 AM, <tytso@mit.edu> wrote:
> On Wed, Jun 09, 2010 at 10:43:33AM -0700, Linus Torvalds wrote:
>>
>> We need that bitmap to handle the overflow max_pid case. We are _not_
>> returning just increasing pid numbers.
>
> Doh!  I knew I was forgetting something obvious.  I was hoping we
> could get rid of the bitmap entirely, but I guess not....
>
> (Unless users would stand for 64-bit pid numbers... no?  Dang. :-)
>
>                                      - Ted
>

(sorry about the previous message, to those who got it... my mail
client silently switched to HTML mode)

I am working on a new version of the change taking into account
comments (both about substance and style) by Michel, Ted and Linus. I
agree with Michel in that I am not sure that the rare case of same
last_pid being set by two threads is worth fixing.