X86 platform drivers
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: platform-driver-x86@vger.kernel.org
Subject: Re: ACER: Add support for accelerometer sensor
Date: Wed, 27 Jun 2012 15:59:16 +0200	[thread overview]
Message-ID: <201206271559.16667.marex@denx.de> (raw)
In-Reply-To: <20120627134326.GF3007@mwanda>

Dear Dan Carpenter,

> On Wed, Jun 27, 2012 at 03:32:12PM +0200, Marek Vasut wrote:
> > Dear Dan Carpenter,
> > 
> > > Hello Marek Vasut,
> > > 
> > > The patch 6ae3a0876185: "ACER: Add support for accelerometer sensor"
> > > from Jun 1, 2012, leads to the following Smatch warning:
> > > drivers/platform/x86/acer-wmi.c:1886 acer_wmi_accel_destroy()
> > > 
> > > 	 error: don't call input_free_device() after input_unregister_device()
> > > 
> > > drivers/platform/x86/acer-wmi.c
> > > 
> > >   1883  static void acer_wmi_accel_destroy(void)
> > >   1884  {
> > >   1885          input_unregister_device(acer_wmi_accel_dev);
> > >   1886          input_free_device(acer_wmi_accel_dev);
> > >   1887  }
> > > 
> > > It is a double free.
> > 
> > I see, understood ... shall I submit subsequent patch?
> 
> Yes, please.  Could you give me a:
> 
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

Looking through input_unregister_device(), that call doesn't free the structure. 
Actually, many drivers call explicitly kfree() on it.

Where do you see the double_free() ?

> regards,
> dan carpenter

Best regards,
Marek Vasut

  reply	other threads:[~2012-06-27 13:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-27 13:15 ACER: Add support for accelerometer sensor Dan Carpenter
2012-06-27 13:32 ` Marek Vasut
2012-06-27 13:43   ` Dan Carpenter
2012-06-27 13:59     ` Marek Vasut [this message]
2012-06-27 14:19       ` Dan Carpenter
2012-06-27 15:01         ` Marek Vasut
2012-06-27 15:34           ` Dan Carpenter
2012-06-27 16:22             ` Marek Vasut

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=201206271559.16667.marex@denx.de \
    --to=marex@denx.de \
    --cc=dan.carpenter@oracle.com \
    --cc=platform-driver-x86@vger.kernel.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