call_usermodehelper: UMH_WAIT_EXEC ignores kernel_thread() failure
PATCH 3/3 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 <[email protected]>
---
kernel/kmod.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/kmod.c renamed from kernel/kmod.c~3_UMH_WAIT_EXEC +2 -2
@@ -254,10 +254,10 @@ static void __call_usermodehelper(structcase 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); } }