Hi all, the attached patch (relative to 2.6.8-rc2-mm2) restricts the number of concurrently running hotplug / kmod processes. It's an update to the patch posted earlier, adapted to suggestions by Andrew Morton (THX for that, Andrew). The current design of call_usermodehelper has the disadvantage that always a kernel thread is started without checking whether enough resources are available. This makes it possible to run any machine out of memory by just generating enough hotplug processes. The patch introduces a semaphore khelper_sem, which is initialised with the maximum number of concurrently running hotplug processes. When the semaphore count hits zero, the process is either blocked (if its an synchronous process) or delayed by returning control to the calling function prior to call down(). In either case we have to wait for the helper thread to finish, as we have to up() the semaphore and free up the process information. Note that we have to copy the process information in case the hotplug event gets delayed, as originally the process information is allocated locally to the calling function, which is lost after control is returned. Please apply. Cheers, Hannes -- Dr. Hannes Reinecke hare@suse.de SuSE Linux AG S390 & zSeries Maxfeldstraße 5 +49 911 74053 688 90409 Nürnberg http://www.suse.de