Re: [PATCH] drivers/net/wimax/i2400m/fw.c fix possible double free

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Darren Jenkins schrieb:
> On Thu, Mar 18, 2010 at 9:10 AM, Inaky Perez-Gonzalez
> <inaky.perez-gonzalez@xxxxxxxxx> 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.
> 
> Darren J.
> 

Hi Darren,
what is done here is not easy to understand, kernel janitor work (IMHO) is not only
to look for potential (!) bugs but also for code clarity. I have learned that programmer
tend to be to much clever and if someone ask about there code, sometimes they notice that
the code *is* really odd.

re,
 wh
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux