netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: darrenrjenkins@gmail.com
Cc: cindy.h.kao@intel.com, wimax@linuxwimax.org,
	netdev@vger.kernel.org, kernel-janitors@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-wimax@intel.com
Subject: Re: [PATCH] drivers/net/wimax/i2400m/fw.c fix possible double free
Date: Sat, 20 Mar 2010 14:24:13 -0700 (PDT)	[thread overview]
Message-ID: <20100320.142413.15249200.davem@davemloft.net> (raw)
In-Reply-To: <1268902008.10536.41.camel@ICE-BOX>

From: Darren Jenkins <darrenrjenkins@gmail.com>
Date: Thu, 18 Mar 2010 19:46:48 +1100

> 
> On Thu, Mar 18, 2010 at 9:10 AM, Inaky Perez-Gonzalez
> <inaky.perez-gonzalez@intel.com> wrote:
> 
>> If krealloc() fails to aallocate a new pointer, the old block is
>> unmodified, so by doing this you are leaking a buffer allocation.
> 
> It seems you are right.
> So now understanding correctly how krealloc() works I can see that the
> double kfree() can only actually happen if the el_size parameter to
> i2400m_zrealloc_2x() is zero, and it isn't at the two call sites.
> 
> So this was a false positive and I am sorry for the noise.

No problem, at least the code got audited :-)

  reply	other threads:[~2010-03-20 21:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-18  8:46 [PATCH] drivers/net/wimax/i2400m/fw.c fix possible double free Darren Jenkins
2010-03-20 21:24 ` David Miller [this message]
  -- strict thread matches above, loose matches on Subject: below --
2010-03-17 12:40 Darren Jenkins
2010-03-17 22:10 ` Inaky Perez-Gonzalez
2010-03-16 11:46 Darren Jenkins
2010-03-16 21:14 ` David Miller
2010-03-17  6:05   ` Inaky Perez-Gonzalez

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=20100320.142413.15249200.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=cindy.h.kao@intel.com \
    --cc=darrenrjenkins@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wimax@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=wimax@linuxwimax.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;
as well as URLs for NNTP newsgroup(s).