mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ian Kent <raven@themaw.net>
To: Michael Tokarev <mjt@tls.msk.ru>
Cc: Tim Gardner <tim.gardner@canonical.com>,
	linux-kernel@vger.kernel.org, autofs@vger.kernel.org
Subject: Re: [PATCH linux-next] autofs4: autofs4_catatonic_mode(): remove redundant null check on kfree()
Date: Wed, 13 Feb 2013 15:37:46 +0800	[thread overview]
Message-ID: <1360741066.2288.7.camel@perseus.themaw.net> (raw)
In-Reply-To: <511B3F5B.4050803@msgid.tls.msk.ru>

On Wed, 2013-02-13 at 11:23 +0400, Michael Tokarev wrote:
> 13.02.2013 11:20, Ian Kent wrote:
> > On Tue, 2013-02-12 at 10:12 -0700, Tim Gardner wrote:
> >> smatch analysis:
> >>
> >> fs/autofs4/waitq.c:46 autofs4_catatonic_mode() info: redundant null
> >>   check on wq->name.name calling kfree()
> >
> > I'm not sure about this change.
> >
> > autofs4_catatonic_mode() could be called when there are remaining
> > entries in the wait queue, which is nulled, so autofs4_wait_release()
> > won't see the the discarded waits if it is called.
> 
> Ian, this is about something else really.  The patch is about the
> NULL check before calling kfree() -- it does the NULL check internally.
> It is nothing about code flow or anything else, it is about calling
> kfree() unconditionally regardless whenever the argument is actually
> NULL or non-NULL.  It makes the code shorter and easier to read.

Oh, right, kfree() does the a NULL check since a long time now.
My bad, sorry.

> 
> You can add my
> 
> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>

So, you would like me to forward this to Linus?

I'd be inclined to wait until the window for 3.9 opens since Linus
probably has more than enough to do finalizing 3.8 right now.

Ian



  reply	other threads:[~2013-02-13  7:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-12 17:12 Tim Gardner
2013-02-13  7:20 ` Ian Kent
2013-02-13  7:23   ` Michael Tokarev
2013-02-13  7:37     ` Ian Kent [this message]
2013-02-13  7:38       ` Michael Tokarev

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=1360741066.2288.7.camel@perseus.themaw.net \
    --to=raven@themaw.net \
    --cc=autofs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mjt@tls.msk.ru \
    --cc=tim.gardner@canonical.com \
    /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®