aboutsummaryrefslogtreecommitdiff
path: root/lib/kobject_uevent.c
diff options
context:
space:
mode:
authorHugh Dickins <hugh@veritas.com>2009-04-16 21:55:29 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2009-04-16 14:41:24 -0700
commit05f54c13cd0c33694eec39a265475c5d6cf223cf (patch)
treef3bdff25fd2e7f405ec159bdabd9ef1166d1f22d /lib/kobject_uevent.c
parent35c80d5f400f68f2eccf3069d1c068e154bde9c9 (diff)
downloadlinux-stericsson-05f54c13cd0c33694eec39a265475c5d6cf223cf.tar.gz
Revert "kobject: don't block for each kobject_uevent".
This reverts commit f520360d93cdc37de5d972dac4bf3bdef6a7f6a7. Tetsuo Handa, running a kernel with CONFIG_DEBUG_PAGEALLOC=y and CONFIG_UEVENT_HELPER_PATH=/sbin/hotplug, has been hitting RCU detected CPU stalls: it's been spinning in the loop where do_execve() counts up the args (but why wasn't fixup_exception working? dunno). The recent change, switching kobject_uevent_env() from UMH_WAIT_EXEC to UMH_NO_WAIT, is broken: the exec uses args on the local stack here, and an env which is kfreed as soon as call_usermodehelper() returns. It very much needs to wait for the exec to be done. An alternative would be to keep the UMH_NO_WAIT, and complicate the code to allocate and free these resources correctly? but no, as GregKH pointed out when making the commit, CONFIG_UEVENT_HELPER_PATH="" is a much better optimization - though some distros are still saying /sbin/hotplug in their .config, yet with no such binary in their initrd or their root. Reported-by: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp> Signed-off-by: Hugh Dickins <hugh@veritas.com> Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Acked-by: Arjan van de Ven <arjan@linux.intel.com> Acked-by: Will Newton <will.newton@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'lib/kobject_uevent.c')
-rw-r--r--lib/kobject_uevent.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/kobject_uevent.c b/lib/kobject_uevent.c
index 97a777ad4f59..dafeecf5b143 100644
--- a/lib/kobject_uevent.c
+++ b/lib/kobject_uevent.c
@@ -258,7 +258,7 @@ int kobject_uevent_env(struct kobject *kobj, enum kobject_action action,
goto exit;
retval = call_usermodehelper(argv[0], argv,
- env->envp, UMH_NO_WAIT);
+ env->envp, UMH_WAIT_EXEC);
}
exit: