Messages in this thread | | | Date | Sun, 25 Jul 2004 18:20:06 -0700 | From | Andrew Morton <> | Subject | Re: [PATCH] Limit number of concurrent hotplug processes |
| |
Hannes Reinecke <hare@suse.de> 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); ... }
- 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/
| |