From: Wen Congyang Date: Thu, 13 Sep 2012 00:58:16 +0000 (+1000) Subject: acpi_memhotplug.c: remove memory info from list before freeing it X-Git-Tag: next-20120920~2^2~263 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=938653c391dd2dd994b1ba6b7b9fe947048ebdb8;p=karo-tx-linux.git acpi_memhotplug.c: remove memory info from list before freeing it We free info, but we forget to remove it from the list. It will cause unexpected problems when we access the list next time. Signed-off-by: Wen Congyang Cc: Len Brown Cc: "Brown, Len" Cc: Yasuaki ISIMATU Cc: David Rientjes Cc: Konrad Rzeszutek Wilk Signed-off-by: Andrew Morton --- diff --git a/drivers/acpi/acpi_memhotplug.c b/drivers/acpi/acpi_memhotplug.c index d97bb952a426..8f529731c8ba 100644 --- a/drivers/acpi/acpi_memhotplug.c +++ b/drivers/acpi/acpi_memhotplug.c @@ -328,6 +328,7 @@ static int acpi_memory_disable_device(struct acpi_memory_device *mem_device) if (result) return result; } + list_del(&info->list); kfree(info); }