lkml.org 
[lkml]   [2010]   [Jun]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Fix a race in pid generation that causes pids to be reused immediately.


On Wed, 9 Jun 2010, tytso@mit.edu wrote:
>
> Well, I was thinking about something like this:

No, this is wrong for the case where you end up having to allocate a new
pidmap and/or overflow max_pid.

It also doesn't set the bit at all.

> There appears to be some interesting uses of the bitmap by
> find_ge_pid() and next_pidmap() that I haven't completely grokked yet,

We need that bitmap to handle the overflow max_pid case. We are _not_
returning just increasing pid numbers.

Linus


\
 
 \ /
  Last update: 2010-06-09 19:47    [W:0.041 / U:0.308 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site