Re: drivers/staging/zram/zram_drv.c:352:8-14: ERROR: reference preceded by free on line 343

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

 



Hi Julia and Fengguang,


On Sun, Oct 28, 2012 at 8:48 AM, Fengguang Wu <fengguang.wu@xxxxxxxxx> wrote:
> Hi,
>
> On Sun, Oct 28, 2012 at 01:09:12AM +0800, Fengguang Wu wrote:
>> Hi Nitin,
>>
>> FYI, there are coccinelle warnings in
>>
>> tree:   git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux master
>> head:   e657e078d3dfa9f96976db7a2b5fd7d7c9f1f1a6
>> commit: c8f2f0db1d0294aaf37e8a85bea9bbc4aaf5c0fe staging: zram: Fix handling of incompressible pages
>> date:   5 days ago
>>
>> + drivers/staging/zram/zram_drv.c:352:8-14: ERROR: reference preceded by free on line 343
>
> I'd like to cite some good comments from Julia:
>
> : I'm not 100% sure whether this is a bug, because the various elements
> : are under different conditionals, and I am not sure to understand the
> : relationship between them.  But I think there is enough of a chance that
> : there is a problem for it to be worth contacting the developer.
> :
> : There is also a problem with the indentation of the kfree, which has too
> : many tabs in front of it.
>

This is indeed a use-after-free bug and will be sending out the fix soon.
Thanks for pointing it out; coccinelle seems worth exploring.

Thanks,
Nitin
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux