[PATCH] Fix for get_pid hang

From: Paul Larson (plars@austin.ibm.com)
Date: Thu Mar 07 2002 - 17:23:58 EST


On Thu, 2002-03-07 at 16:11, Paul Larson wrote:
> On Thu, 2002-03-07 at 14:45, Patrick O'Rourke wrote:
> > It is possible on large memory systems that the default process limits
> > can exceed PID_MAX. This will allow a non-root user to consume all pids
> > resulting in the kernel to basically hang in get_pid().
> >
>
> > + /* don't let threads go beyond PID_MAX */
> > + if (max_threads > PID_MAX) {
> > + max_threads = PID_MAX;
> > + }
> > +
> The problem with this approach is that it doesn't take into account
> pgrp, tgids, etc... I submitted the following patch a couple of weeks
> ago that fixes the problem a better way.
>
> Thanks,
> Paul Larson

Marcelo, any chance of getting this accepted into the next 2.4.19-pre?
It is obviously a bug that is afecting several others as well. I think
the LSE team is looking at some performance enhancements to get_pid, but
from what I've seen so far they will be working on top of this bug fix.
I just verified that the patch still applies cleanly against
2.4.19-pre2.

Thanks,
Paul Larson

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



This archive was generated by hypermail 2b29 : Thu Mar 07 2002 - 21:01:10 EST