From: Nigel Cunningham 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. Signed-off-by: Nigel Cunningham Cc: Signed-off-by: Andrew Morton --- kernel/kmod.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff -puN kernel/kmod.c~fix-unbalanced-helper_lock-in-kernel-kmodc kernel/kmod.c --- a/kernel/kmod.c~fix-unbalanced-helper_lock-in-kernel-kmodc +++ a/kernel/kmod.c @@ -465,13 +465,16 @@ int call_usermodehelper_exec(struct subp 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 */ + retval = 0; + goto unlock; + } wait_for_completion(&done); retval = sub_info->retval; - out: +out: call_usermodehelper_freeinfo(sub_info); +unlock: helper_unlock(); return retval; } _