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

From: Salman Qazi
Date: Wed Jun 09 2010 - 14:10:00 EST


On Wed, Jun 9, 2010 at 10:47 AM, <tytso@xxxxxxx> 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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/