summaryrefslogtreecommitdiffstats
path: root/kernel/kmod.c
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@redhat.com>2010-05-26 23:43:05 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2010-05-27 18:12:45 +0200
commit04b1c384fbc4e0209e5c1affb67050886376d44b (patch)
tree19bc8690113dd6ded88d465a0777cb8bf7e33262 /kernel/kmod.c
parentcall_usermodehelper: simplify/fix UMH_NO_WAIT case (diff)
downloadlinux-04b1c384fbc4e0209e5c1affb67050886376d44b.tar.xz
linux-04b1c384fbc4e0209e5c1affb67050886376d44b.zip
call_usermodehelper: UMH_WAIT_EXEC ignores kernel_thread() failure
UMH_WAIT_EXEC should report the error if kernel_thread() fails, like UMH_WAIT_PROC does. Signed-off-by: Oleg Nesterov <oleg@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/kmod.c')
-rw-r--r--kernel/kmod.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/kmod.c b/kernel/kmod.c
index ad9f2edebd67..6e9b19667a8d 100644
--- a/kernel/kmod.c
+++ b/kernel/kmod.c
@@ -235,10 +235,10 @@ static void __call_usermodehelper(struct work_struct *work)
case UMH_WAIT_PROC:
if (pid > 0)
break;
- sub_info->retval = pid;
/* FALLTHROUGH */
-
case UMH_WAIT_EXEC:
+ if (pid < 0)
+ sub_info->retval = pid;
complete(sub_info->complete);
}
}