Commit 288d5abe authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Boot up with usermodehelper disabled

The core device layer sends tons of uevent notifications for each device
it finds, and if the kernel has been built with a non-empty
CONFIG_UEVENT_HELPER_PATH that will make us try to execute the usermode
helper binary for all these events very early in the boot.

Not only won't the root filesystem even be mounted at that point, we
literally won't have necessarily even initialized all the process
handling data structures at that point, which causes no end of silly
problems even when the usermode helper doesn't actually succeed in

So just use our existing infrastructure to disable the usermodehelpers
to make the kernel start out with them disabled.  We enable them when
we've at least initialized stuff a bit.

Problems related to an uninitialized


reported by various people.
Reported-by: default avatarManuel Lauss <>
Reported-by: default avatarRichard Weinberger <>
Reported-by: default avatarMarc Zyngier <>
Acked-by: default avatarKay Sievers <>
Cc: Andrew Morton <>
Cc: Vasiliy Kulikov <>
Cc: Greg KH <>
Signed-off-by: default avatarLinus Torvalds <>
parent 33f35f2a
......@@ -369,9 +369,12 @@ static noinline void __init_refok rest_init(void)
/* At this point, we can enable user mode helper functionality */
/* Call into cpu_idle with preempt disabled */
......@@ -274,7 +274,7 @@ static void __call_usermodehelper(struct work_struct *work)
* (used for preventing user land processes from being created after the user
* land has been frozen during a system-wide hibernation or suspend operation).
static int usermodehelper_disabled;
static int usermodehelper_disabled = 1;
/* Number of helpers running */
static atomic_t running_helpers = ATOMIC_INIT(0);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment