On Thursday, 17 of January 2008, Nigel Cunningham wrote:
> Hi all.

Hi,

> First up, sorry for not inlining the patch - trouble with line wrapping.

No big deal.

> In 2.6.24-rc8, call_usermodehelper_exec has an exit path that can leave
> the helper_lock() call at the top of the routine unbalanced. The
> attached patch fixes this issue.

Thanks a lot for the patch (reproduced below), I think it's 2.6.24 material.
Andrew?

> Signed-off-by: Nigel Cunningham <[EMAIL PROTECTED]>

---
From: Nigel Cunningham <[EMAIL PROTECTED]>

In 2.6.24-rc8, call_usermodehelper_exec has an exit path that can leave
the helper_lock() call at the top of the routine unbalanced.  Fix it.

Signed-off-by: Nigel Cunningham <[EMAIL PROTECTED]>
Signed-off-by: Rafael J. Wysocki <[EMAIL PROTECTED]>
---
diff --git a/kernel/kmod.c b/kernel/kmod.c
index c6a4f8a..de27e15 100644
--- a/kernel/kmod.c
+++ b/kernel/kmod.c
@@ -468,8 +468,10 @@ 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 */
+       if (wait == UMH_NO_WAIT) { /* task has freed sub_info */
+               helper_unlock();
                return 0;
+       }
        wait_for_completion(&done);
        retval = sub_info->retval;
 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to