mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: viro@zeniv.linux.org.uk, rostedt@goodmis.org, fweisbec@gmail.com,
	mingo@redhat.com, akpm@linux-foundation.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] kmod: Check for NULL at call_usermodehelper_exec().
Date: Sun, 15 Sep 2013 18:31:57 +0200	[thread overview]
Message-ID: <20130915163157.GB13344@redhat.com> (raw)
In-Reply-To: <201309152323.GDG73435.VLOQFHOJtOFFSM@I-love.SAKURA.ne.jp>

ACK, but...

On 09/15, Tetsuo Handa wrote:
>
> @@ -572,6 +572,10 @@ int call_usermodehelper_exec(struct subprocess_info *sub_info, int wait)
>  	int retval = 0;
>  
>  	helper_lock();
> +	if (!sub_info->path) {
> +		retval = -ENOENT;
> +		goto out;
> +	}

May I suggest you to send v2?

It looks a bit ugly to check ->path under helper_lock(), just add

	if (!sub_info->path)
		retval = -ENOENT;

at the start. Otherwise the code looks as if there is a subtle
reason to take the lock before this check.


Perhaps you can also mention that this problems was fixed by
264b83c07a and right after that 7f57cfa4e2 reintroduced it,
because I am stupid.

Oleg.


  reply	other threads:[~2013-09-15 16:38 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-14  7:32 [PATCH] argv_split: Return NULL if argument contains no non-whitespace Tetsuo Handa
2013-09-14 15:41 ` Oleg Nesterov
2013-09-15  0:10   ` [PATCH] argv_split: Return NULL if argument contains nonon-whitespace Tetsuo Handa
2013-09-15 14:23     ` [PATCH] kmod: Check for NULL at call_usermodehelper_exec() Tetsuo Handa
2013-09-15 16:31       ` Oleg Nesterov [this message]
2013-09-15 17:02         ` Tetsuo Handa
2013-09-15 17:15           ` Oleg Nesterov
2013-09-15 17:26             ` Tetsuo Handa
2013-09-15 17:34               ` Oleg Nesterov
2013-09-23 21:12               ` Tetsuo Handa
2013-09-23 21:30                 ` Andrew Morton
2013-09-24 14:58                   ` Tetsuo Handa
2013-09-15 16:26     ` [PATCH] argv_split: Return NULL if argument contains nonon-whitespace Oleg Nesterov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130915163157.GB13344@redhat.com \
    --to=oleg@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=penguin-kernel@I-love.SAKURA.ne.jp \
    --cc=rostedt@goodmis.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®