Re: [Patch v5 3/7] acpi_memhotplug.c: fix memory leak when memorydevice is unbound from the module acpi_memhotplug

From: David Rientjes
Date: Thu Nov 15 2012 - 18:34:54 EST


On Thu, 15 Nov 2012, Wen Congyang wrote:

> We allocate memory to store acpi_memory_info, so we should free it before
> freeing mem_device.
>
> CC: David Rientjes <rientjes@xxxxxxxxxx>
> CC: Jiang Liu <liuj97@xxxxxxxxx>
> CC: Len Brown <len.brown@xxxxxxxxx>
> CC: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>
> CC: Paul Mackerras <paulus@xxxxxxxxx>
> CC: Christoph Lameter <cl@xxxxxxxxx>
> Cc: Minchan Kim <minchan.kim@xxxxxxxxx>
> CC: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
> CC: KOSAKI Motohiro <kosaki.motohiro@xxxxxxxxxxxxxx>
> CC: Yasuaki Ishimatsu <isimatu.yasuaki@xxxxxxxxxxxxxx>
> CC: Rafael J. Wysocki <rjw@xxxxxxx>
> CC: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
> Signed-off-by: Wen Congyang <wency@xxxxxxxxxxxxxx>

Acked-by: David Rientjes <rientjes@xxxxxxxxxx>

It's a little strange to be re-initializing mem_device->res_list right
before freeing mem_device in acpi_memory_device_free(), though. Owell :)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/