[PATCH 0/2] mtd: nandsim: fix error handling
Sheng Yong
shengyong1 at huawei.com
Tue Jun 23 17:53:00 PDT 2015
On 6/23/2015 2:26 PM, Richard Weinberger wrote:
> Am 23.06.2015 um 03:03 schrieb Sheng Yong:
>> Ping. Any comments are appreciated :)
>>
>> thanks,
>> Sheng
>>
>> On 6/17/2015 4:45 PM, Sheng Yong wrote:
>>> These 2 patches fix error handling when nandsim initialization fails.
>>>
>>> In alloc_device(), if creating slab memory fails, free_device() will try
>>> to destroy the slab memory without checking if it exists. PATCH 1 fixes
>>> it.
>>>
>>> If something goes wrong in init_nandsim(), it calls free_device() before
>>> returning. However, the caller of init_nandsim() - ns_init_module() - also
>>> does the cleanup by calling free_nandsim(). This causes double free. PATCH
>>> 2 fixes it.
>>>
>>> Thanks,
>>> Sheng
>>>
>>> Sheng Yong (2):
>>> mtd: nandsim: fix free of NULL pointer
>>> mtd: nandsim: fix double free
>
> Both patches look good to me.
Hi, Richard
Can I add your reviewed-by?
thanks,
Sheng
>
> Thanks,
> //richard
>
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/
>
>
More information about the linux-mtd
mailing list