lkml.org 
[lkml]   [2000]   [Dec]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: minor bugs around fork_init
Pavel Machek wrote:
>
> Hi!
>
> > > * get_pid causes a deadlock when all pid numbers are in use.
> > > In the worst case, only 10900 threads are required to exhaust
> > > the 15 bit pid space.
> >
> > Yes. I posted a patch for 31-bit pids once or twice.
> > There is no great hurry, but on the other hand, it is always
> > better to make these changes long before it is really urgent.
>
> On 2Gig machine, you should be able to overflow 16 bits. So it is
> quite urgent.

That's another problem!
31 bit uid would be a nice feature for 2.4, but the last time I asked
Linus he answered that the high bits are still reserved.

My patch fixes bugs in the current, 15 bit implementation:
* we don't reserve any threads for root as 2.2 did
* if a user limit allows for > 10900 threads, then that user can cause a
deadlock by using all pid values (one thread can block 3 pid values).
get_pid() will loop forever.
* in theory, 2 threads could get the same pid.

--
Manfred
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:52    [W:0.051 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site