The patch titled Fix ____call_usermodehelper errors being silently ignored has been added to the -mm tree. Its filename is fix-____call_usermodehelper-errors-being-silently-ignored.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: Fix ____call_usermodehelper errors being silently ignored From: Björn Steinbrink <B.Steinbrink@xxxxxx> If ____call_usermodehelper fails, we're not interested in the child process' exit value, but the real error, so let's stop wait_for_helper from overwriting it in that case. Issue discovered by Benedikt Böhm while working on a Linux-VServer usermode helper. Signed-off-by: Björn Steinbrink <B.Steinbrink@xxxxxx> Cc: Rusty Russell <rusty@xxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- kernel/kmod.c | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletion(-) diff -puN kernel/kmod.c~fix-____call_usermodehelper-errors-being-silently-ignored kernel/kmod.c --- a/kernel/kmod.c~fix-____call_usermodehelper-errors-being-silently-ignored +++ a/kernel/kmod.c @@ -191,6 +191,8 @@ static int wait_for_helper(void *data) if (pid < 0) { sub_info->retval = pid; } else { + int ret; + /* * Normally it is bogus to call wait4() from in-kernel because * wait4() wants to write the exit code to a userspace address. @@ -200,7 +202,15 @@ static int wait_for_helper(void *data) * * Thus the __user pointer cast is valid here. */ - sys_wait4(pid, (int __user *) &sub_info->retval, 0, NULL); + sys_wait4(pid, (int __user *)&ret, 0, NULL); + + /* + * If ret is 0, either ____call_usermodehelper failed and the + * real error code is already in sub_info->retval or + * sub_info->retval is 0 anyway, so don't mess with it then. + */ + if (ret) + sub_info->retval = ret; } complete(sub_info->complete); _ Patches currently in -mm which might be from B.Steinbrink@xxxxxx are fix-____call_usermodehelper-errors-being-silently-ignored.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html