All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Walls <awalls@md.metrocast.net>
To: Dan Carpenter <error27@gmail.com>, Jesper Juhl <jj@chaosbits.net>
Cc: linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org,
	Jarod Wilson <jarod@redhat.com>,
	Jerome Brock <jbrock@users.sourceforge.net>,
	Mauro Carvalho Chehab <mchehab@redhat.com>,
	Gerd Knorr <kraxel@goldbach.in-berlin.de>,
	Jarod Wilson <jarod@wilsonet.com>,
	Greg Kroah-Hartman <gregkh@suse.de>,
	Thomas Reitmayr <treitmayr@yahoo.com>,
	Michal Kochanowicz <mkochano@pld.org.pl>,
	Christoph Bartelmus <lirc@bartelmus.de>,
	Mark Weaver <mark@npsl.co.uk>,
	Ulrich Mueller <ulrich.mueller42@web.de>,
	Stefan Jahn <stefan@lkcc.org>
Subject: Re: [PATCH] staging; lirc, zilog: put_ir_rx may free 'rx' which can lead to double free
Date: Sun, 31 Jul 2011 08:42:08 -0400	[thread overview]
Message-ID: <1312116130.2271.8.camel@palomino.walls.org> (raw)
In-Reply-To: <20110729060822.GF3752@shale.localdomain>

On Fri, 2011-07-29 at 09:08 +0300, Dan Carpenter wrote:
> On Thu, Jul 28, 2011 at 11:49:51PM +0200, Jesper Juhl wrote:
> > If calling put_ir_rx(rx, true); in
> > drivers/staging/lirc/lirc_zilog.c::ir_probe() returns true (1) then it
> > means that it has freed it's first argument. Subsequently jumping to
> > 'out_put_xx' will cause us to call put_ir_rx() once more since 'rx' is
> > not zero - leading to a double free.
> 
> It would be better to just remove the first call to put_ir_rx().

Jesper,

(Emails from you don't seem to make it to me, so I looked at your patch
in lkml.org archive.)

Good catch!

Although either fix will work, I do prefer Dan's suggested fix.  Could
you please implement that?

Since emails from you don't seem to make it to me, and since Dan's
suggestion is trivial to implement, I'll just ack that form of the fix
right now:

Acked-by: Andy Walls <awalls@md.metrocast.net>

Regards,
Andy


  parent reply	other threads:[~2011-07-31 12:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-28 21:49 [PATCH] staging; lirc, zilog: put_ir_rx may free 'rx' which can lead to double free Jesper Juhl
2011-07-29  6:08 ` Dan Carpenter
2011-07-29  9:14   ` Jesper Juhl
2011-07-29 10:03   ` Andy Walls
2011-07-29 10:26     ` Jesper Juhl
2011-07-31 12:42   ` Andy Walls [this message]
2011-07-31 12:49   ` Andy Walls

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=1312116130.2271.8.camel@palomino.walls.org \
    --to=awalls@md.metrocast.net \
    --cc=devel@driverdev.osuosl.org \
    --cc=error27@gmail.com \
    --cc=gregkh@suse.de \
    --cc=jarod@redhat.com \
    --cc=jarod@wilsonet.com \
    --cc=jbrock@users.sourceforge.net \
    --cc=jj@chaosbits.net \
    --cc=kraxel@goldbach.in-berlin.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lirc@bartelmus.de \
    --cc=mark@npsl.co.uk \
    --cc=mchehab@redhat.com \
    --cc=mkochano@pld.org.pl \
    --cc=stefan@lkcc.org \
    --cc=treitmayr@yahoo.com \
    --cc=ulrich.mueller42@web.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.