Skip to contentSkip to conversation

call_usermodehelper: UMH_WAIT_EXEC ignores kernel_thread() failure

PATCH New Oleg Nesterov 1 participant 1 message Mar 9, 2010

lore
Share & tools
lore
#0 lore raw

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.

---

 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(struct
 	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);
 	}
 }