mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dan Carpenter <error27@gmail.com>
To: 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>,
	Andy Walls <awalls@md.metrocast.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: Fri, 29 Jul 2011 09:08:22 +0300	[thread overview]
Message-ID: <20110729060822.GF3752@shale.localdomain> (raw)
In-Reply-To: <alpine.LNX.2.00.1107282345540.20477@swampdragon.chaosbits.net>

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().

regards,
dan carpenter


  reply	other threads:[~2011-07-29  6:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-28 21:49 Jesper Juhl
2011-07-29  6:08 ` Dan Carpenter [this message]
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
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=20110729060822.GF3752@shale.localdomain \
    --to=error27@gmail.com \
    --cc=awalls@md.metrocast.net \
    --cc=devel@driverdev.osuosl.org \
    --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 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®