From 3add3a2dbb344ad9a6e5758e457aa0673f757d6d Mon Sep 17 00:00:00 2001 From: Nigel Cunningham Date: Thu, 17 Jan 2008 15:21:21 -0800 Subject: [PATCH] --- yaml --- r: 75534 b: refs/heads/master c: 784680336b616dcc4c17cbd25add3b49c555cdeb h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/kernel/kmod.c | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/[refs] b/[refs] index d73b0852c173..fe27b06b8f2d 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 34aebfd3bdc93c0c5614f1f61e43b6ddc4be52ae +refs/heads/master: 784680336b616dcc4c17cbd25add3b49c555cdeb diff --git a/trunk/kernel/kmod.c b/trunk/kernel/kmod.c index c6a4f8aebeba..bb7df2a28bd7 100644 --- a/trunk/kernel/kmod.c +++ b/trunk/kernel/kmod.c @@ -451,13 +451,11 @@ int call_usermodehelper_exec(struct subprocess_info *sub_info, enum umh_wait wait) { DECLARE_COMPLETION_ONSTACK(done); - int retval; + int retval = 0; helper_lock(); - if (sub_info->path[0] == '\0') { - retval = 0; + if (sub_info->path[0] == '\0') goto out; - } if (!khelper_wq || usermodehelper_disabled) { retval = -EBUSY; @@ -468,13 +466,14 @@ int call_usermodehelper_exec(struct subprocess_info *sub_info, sub_info->wait = wait; queue_work(khelper_wq, &sub_info->work); - if (wait == UMH_NO_WAIT) /* task has freed sub_info */ - return 0; + if (wait == UMH_NO_WAIT) /* task has freed sub_info */ + goto unlock; wait_for_completion(&done); retval = sub_info->retval; - out: +out: call_usermodehelper_freeinfo(sub_info); +unlock: helper_unlock(); return retval; }