浏览代码

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>
Oleg Nesterov 15 年之前
父节点
当前提交
04b1c384fb
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      kernel/kmod.c

+ 2 - 2
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);
 	}
 }