mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paul Larson <plars@austin.ibm.com>
To: Marcelo Tosati <marcelo@conectiva.com.br>,
	lkml <linux-kernel@vger.kernel.org>
Subject: [PATCH] Fix for get_pid hang
Date: 07 Mar 2002 16:23:58 -0600	[thread overview]
Message-ID: <1015539839.16835.18.camel@plars.austin.ibm.com> (raw)
In-Reply-To: <1015539061.16836.10.camel@plars.austin.ibm.com>
In-Reply-To: <200203072045.PAA08386@egenera.com>  <1015539061.16836.10.camel@plars.austin.ibm.com>

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




  parent reply	other threads:[~2002-03-07 22:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-07 20:45 [PATCH] Prevent max_threads from exceeding PID_MAX Patrick O'Rourke
2002-03-07 22:11 ` Paul Larson
2002-03-07 22:23 ` Paul Larson [this message]
2002-03-07 22:25 ` [PATCH] Fix for get_pid hang Paul Larson
2002-03-08 15:02   ` Patrick O'Rourke

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1015539839.16835.18.camel@plars.austin.ibm.com \
    --to=plars@austin.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo@conectiva.com.br \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®