From 9a965b116ea666713413b9c30367b4824275e011 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Thu, 24 Sep 2009 01:02:55 +0200 Subject: [PATCH] --- yaml --- r: 165599 b: refs/heads/master c: 95e0d86badc410d525ea7218fd32df7bfbf9c837 h: refs/heads/master i: 165597: 8c9ff631c98ba0fe70fed0608811b19fd5a2f405 165595: 4a5e44a85ae64602c552c243ec36bfa878e30240 165591: 06b3ea93489a91c1d33c58112b4a672885d1bacb 165583: 317f36dfdb9b501adb634fc3b465e84d5712da4c 165567: 872d2eb53b0a65dc695bb2f0dd56c2d7c14ab9a1 v: v3 --- [refs] | 2 +- trunk/kernel/kmod.c | 13 +++++-------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/[refs] b/[refs] index a5abe669f9b9..69e91e75b6d8 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 0dd52d0df02733dfc2d5f3824e41b96492305384 +refs/heads/master: 95e0d86badc410d525ea7218fd32df7bfbf9c837 diff --git a/trunk/kernel/kmod.c b/trunk/kernel/kmod.c index 689d20f39305..9fcb53a11f87 100644 --- a/trunk/kernel/kmod.c +++ b/trunk/kernel/kmod.c @@ -143,7 +143,6 @@ struct subprocess_info { static int ____call_usermodehelper(void *data) { struct subprocess_info *sub_info = data; - enum umh_wait wait = sub_info->wait; int retval; BUG_ON(atomic_read(&sub_info->cred->usage) != 1); @@ -185,14 +184,10 @@ static int ____call_usermodehelper(void *data) */ set_user_nice(current, 0); - if (wait == UMH_WAIT_EXEC) - complete(sub_info->complete); - retval = kernel_execve(sub_info->path, sub_info->argv, sub_info->envp); /* Exec failed? */ - if (wait != UMH_WAIT_EXEC) - sub_info->retval = retval; + sub_info->retval = retval; do_exit(0); } @@ -271,14 +266,16 @@ static void __call_usermodehelper(struct work_struct *work) switch (wait) { case UMH_NO_WAIT: - case UMH_WAIT_EXEC: break; case UMH_WAIT_PROC: if (pid > 0) break; sub_info->retval = pid; - break; + /* FALLTHROUGH */ + + case UMH_WAIT_EXEC: + complete(sub_info->complete); } }