From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Morton Date: Mon, 26 Jul 2004 01:20:06 +0000 Subject: Re: [PATCH] Limit number of concurrent hotplug processes Message-Id: <20040725182006.6c6a36df.akpm@osdl.org> List-Id: References: <40FD23A8.6090409@suse.de> In-Reply-To: <40FD23A8.6090409@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Hannes Reinecke Cc: linux-hotplug-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org Hannes Reinecke wrote: > > the attached patch limits the number of concurrent hotplug processes. > Main idea behind it is that currently each call to call_usermodehelper > will result in an execve() of "/sbin/hotplug", without any check whether > enough resources are available for successful execution. This leads to > hotplug being stuck and in worst cases to machines being unable to boot. > > This check cannot be implemented in userspace as the resources are > already taken by the time any resource check can be done; for the same > reason any 'slim' programs as /sbin/hotplug will only delay the problem. hm, it's a bit sad that this happens. Are you able to tell us more about what is causing such an explosion of module probes? > Any comments/suggestions welcome; otherwise please apply. I suggest you just use a semaphore, initialised to a suitable value: static struct semaphore foo = __SEMAPHORE_INITIALIZER(foo, 50); { ... down(&foo); ... up(&foo); ... } ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_idG21&alloc_id040&op=click _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel