[linux-mm-cc] [PATCH] ramzswap: fix NULL pointer dereference on memory allocation failed
Nitin Gupta
ngupta at vflare.org
Mon May 2 09:29:42 EDT 2011
On 05/02/2011 09:16 AM, Sergey Evlashev wrote:
> Hi,
>
> On 04/30/2011 04:24 AM, ext Nitin Gupta wrote:
>> Hi,
>>
>> On 04/28/2011 11:57 AM, Sergey Evlashev wrote:
>>> From: Kirill A. Shutemov<kirill at shutemov.name>
>>>
>>> reset_devices() uses in ramzswap_ioctl_init_device() error path. So we
>>> have to check if rzs->table was really allocated before freeing it.
>>>
>>> Signed-off-by: Kirill A. Shutemov<kirill at shutemov.name>
>>> Signed-off-by: Sergey Evlashev<sergey.evlashev at nokia.com>
>>> Reported-by: Phil Carmody<ext-phil.2.carmody at nokia.com>
>>
>>
>> Thanks for this fix but I'm no longer maintaining this old ramzswap
>> code. Is there any reason why you can't switch to new zram code.
>>
> I guess we have a snapshot of ramzswap code which was adopted for
> 2.6.32 some time ago.
> Do you have a patch of the latest zram code for 2.6.32?
I don't have latest zram as a kernel patch but you can download zram as
a separate module:
hg clone https://nitingupta910@compcache.googlecode.com/hg/ compcache
(almost identical to current mainline version)
Some zram documentation (setting disksize, creating filesystem etc):
http://en.gentoo-wiki.com/wiki/Zram_disks
Thanks to Gentoo folks!
Please let me know if you face any issues running this on 2.6.32
Thanks,
Nitin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.laptop.org/pipermail/linux-mm-cc/attachments/20110502/6c47e347/attachment.htm
More information about the linux-mm-cc
mailing list