From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: "Samuel Iglesias Gonsálvez" <siglesias@igalia.com>
Cc: industrypack-devel@lists.sourceforge.net,
linux-kernel@vger.kernel.org,
Jens Taprogge <jens.taprogge@taprogge.org>
Subject: Re: [PATCH 1/3] ipack: avoid double free on device->id
Date: Fri, 8 Mar 2013 11:36:24 -0800 [thread overview]
Message-ID: <20130308193624.GD14144@kroah.com> (raw)
In-Reply-To: <513A29B6.9080008@igalia.com>
On Fri, Mar 08, 2013 at 07:11:02PM +0100, Samuel Iglesias Gonsálvez wrote:
> On 03/08/2013 06:47 PM, Greg Kroah-Hartman wrote:
> > On Fri, Mar 08, 2013 at 09:21:45AM +0100, Samuel Iglesias
> > Gonsalvez wrote:
> >> Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
> >> --- drivers/ipack/ipack.c | 1 + 1 file changed, 1
> >> insertion(+)
> >>
> >> diff --git a/drivers/ipack/ipack.c b/drivers/ipack/ipack.c index
> >> 7ec6b20..599d4ff 100644 --- a/drivers/ipack/ipack.c +++
> >> b/drivers/ipack/ipack.c @@ -24,6 +24,7 @@ static void
> >> ipack_device_release(struct device *dev) { struct ipack_device
> >> *device = to_ipack_dev(dev); kfree(device->id); + device->id =
> >> NULL;
> >
> > How does that keep anything from being freed twice?
> >
> >> device->release(device);
> >
> > device should now be gone after this call, right? What am I
> > missing?
> >
>
> Yes, you are right. It's not possible to have it freed twice once it's
> in ipack_device_release().
>
> You can skip this patch. If you want, I can resend the others accordingly.
If the others require this one to be applied, in order for them to apply
properly, yes, it would be great to resend. If not, I'll just skip the
first one.
thanks,
greg k-h
next prev parent reply other threads:[~2013-03-08 19:35 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-26 9:03 [PATCH] ipack: add missing put_device() after device_register() failed Samuel Iglesias Gonsalvez
2013-02-26 22:28 ` Dmitry Torokhov
2013-02-27 9:00 ` Samuel Iglesias Gonsálvez
2013-03-08 8:21 ` [PATCH 1/3] ipack: avoid double free on device->id Samuel Iglesias Gonsalvez
2013-03-08 8:21 ` [PATCH 2/3] ipack: add ipack_get_device() ipack_put_device() Samuel Iglesias Gonsalvez
2013-03-08 8:21 ` [PATCH 3/3] ipack: split ipack_device_register() in several functions Samuel Iglesias Gonsalvez
2013-03-08 17:47 ` [PATCH 1/3] ipack: avoid double free on device->id Greg Kroah-Hartman
2013-03-08 18:11 ` Samuel Iglesias Gonsálvez
2013-03-08 18:11 ` Samuel Iglesias Gonsálvez
2013-03-08 19:36 ` Greg Kroah-Hartman [this message]
2013-03-11 7:58 ` Samuel Iglesias Gonsálvez
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=20130308193624.GD14144@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=industrypack-devel@lists.sourceforge.net \
--cc=jens.taprogge@taprogge.org \
--cc=linux-kernel@vger.kernel.org \
--cc=siglesias@igalia.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