mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Martyn Welch <martyn@welchs.me.uk>
To: Linus Torvalds <torvalds@linux-foundation.org>,
	dingxiang@cmss.chinamobile.com
Cc: manohar.vanga@gmail.com,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Staging subsystem List <devel@driverdev.osuosl.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] vme: remove unneeded kfree
Date: Fri, 07 Sep 2018 09:33:08 +0100	[thread overview]
Message-ID: <1536309188.8050.9.camel@welchs.me.uk> (raw)
In-Reply-To: <CA+55aFxuha1tQXcn+WtbOKzwwmtA8AORb04tMM=hk6jT3ntt3w@mail.gmail.com>

On Thu, 2018-09-06 at 22:04 -0700, Linus Torvalds wrote:
> On Thu, Sep 6, 2018 at 1:51 AM Ding Xiang
> <dingxiang@cmss.chinamobile.com> wrote:
> > 
> > put_device will call vme_dev_release to free vdev, kfree is
> > unnecessary here.
> 
> That does seem to be the case.  I think "unnecessary" is overly kind,
> it does seem to be a double free.
> 
> Looks like the issue was introduced back in 2013 by commit
> def1820d25fa ("vme: add missing put_device() after device_register()
> fails").
> 
> It seems you should *either* kfree() the vdev, _or_ do put_device(),
> but doing both seems wrong.
> 
> I presume the device_register() has never failed, and this being
> vme-only I'm guessing there isn't a vibrant testing community.
> 

I think that is also overly kind :-)

I currently lack access to suitable hardware to test fully myself and I
need to find some time to (re)implement some automated testing, after I
lost access to the bits I had when I left a previous employer. That and
see if I can get access to some hardware again...

Manohar, do you still have access/interest in the VME stuff? You've
been very quiet for a long time now.

Martyn

      parent reply	other threads:[~2018-09-07  8:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-06  8:51 Ding Xiang
2018-09-07  5:04 ` Linus Torvalds
2018-09-07  7:20   ` Greg Kroah-Hartman
2018-09-07  8:33   ` Martyn Welch [this message]

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=1536309188.8050.9.camel@welchs.me.uk \
    --to=martyn@welchs.me.uk \
    --cc=devel@driverdev.osuosl.org \
    --cc=dingxiang@cmss.chinamobile.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manohar.vanga@gmail.com \
    --cc=torvalds@linux-foundation.org \
    /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®