Driver core: add CONFIG_UEVENT_HELPER_PATH
authorKay Sievers <kay.sievers@vrfy.org>
Wed, 15 Aug 2007 13:38:28 +0000 (15:38 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 12 Oct 2007 21:51:01 +0000 (14:51 -0700)
The kernel creates a process for every event that is send, even when
there is no binary it could execute.  We are needlessly creating around
200-300 failing processes during early bootup, until we have the chance
to disable it from userspace.

This change allows us to disable /sbin/hotplug entirely, if you want to,
by setting UEVENT_HELPER_PATH="" in the kernel config.

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/base/Kconfig
lib/kobject_uevent.c

index 5d6312e3349062cee54d204163bb5407d300a1bb..d7da109c24fd298a5bf6cd527bb3b0fdad783d7a 100644 (file)
@@ -1,5 +1,13 @@
 menu "Generic Driver Options"
 
+config UEVENT_HELPER_PATH
+       string "path to uevent helper"
+       depends on HOTPLUG
+       default "/sbin/hotplug"
+       help
+         Path to uevent helper program forked by the kernel for
+         every uevent.
+
 config STANDALONE
        bool "Select only drivers that don't need compile-time external firmware" if EXPERIMENTAL
        default y
index 7d8aeb301635715761f2e1c5b2870f9475727967..5ccda460262c2bb88dfa35820a214baad3feb536 100644 (file)
@@ -35,7 +35,7 @@ const char *kobject_actions[] = {
 
 #if defined(CONFIG_HOTPLUG)
 u64 uevent_seqnum;
-char uevent_helper[UEVENT_HELPER_PATH_LEN] = "/sbin/hotplug";
+char uevent_helper[UEVENT_HELPER_PATH_LEN] = CONFIG_UEVENT_HELPER_PATH;
 static DEFINE_SPINLOCK(sequence_lock);
 #if defined(CONFIG_NET)
 static struct sock *uevent_sock;