Re: [PATCH] kmod: Check for NULL at call_usermodehelper_exec().

From: Oleg Nesterov
Date: Sun Sep 15 2013 - 13:41:22 EST


Argh...

Tetsuo, I am sorry. Not only I am stupid, I managed to confuse you.

On 09/16, Tetsuo Handa wrote:
>
> Acked-by: Oleg Nesterov <oleg@xxxxxxxxxx>

I tried to ack you previous version which I wrongly blamed ;)

However, I agree with this version as well. Feel free to use
either one, you have my ack in any case.

Sorry to all for noise and confusion.

> ---
> kernel/kmod.c | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/kernel/kmod.c b/kernel/kmod.c
> index fb32636..a962470 100644
> --- a/kernel/kmod.c
> +++ b/kernel/kmod.c
> @@ -571,6 +571,10 @@ int call_usermodehelper_exec(struct subprocess_info *sub_info, int wait)
> DECLARE_COMPLETION_ONSTACK(done);
> int retval = 0;
>
> + if (!sub_info->path) {
> + call_usermodehelper_freeinfo(sub_info);
> + return -ENOENT;
> + }
> helper_lock();
> if (!khelper_wq || usermodehelper_disabled) {
> retval = -EBUSY;
> --
> 1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/