Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 04b1c384 authored by Oleg Nesterov's avatar Oleg Nesterov Committed by Linus Torvalds
Browse files

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: default avatarOleg Nesterov <oleg@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent d47419cd
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -235,10 +235,10 @@ static void __call_usermodehelper(struct work_struct *work)
	case UMH_WAIT_PROC:
	case UMH_WAIT_PROC:
		if (pid > 0)
		if (pid > 0)
			break;
			break;
		sub_info->retval = pid;
		/* FALLTHROUGH */
		/* FALLTHROUGH */

	case UMH_WAIT_EXEC:
	case UMH_WAIT_EXEC:
		if (pid < 0)
			sub_info->retval = pid;
		complete(sub_info->complete);
		complete(sub_info->complete);
	}
	}
}
}