From 0ef0e708c8afcbcbe6b19ba557b40aa8dc723e5d Mon Sep 17 00:00:00 2001 From: Wen Congyang Date: Sat, 21 Jul 2012 10:53:44 +1000 Subject: [PATCH] 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 --- drivers/acpi/acpi_memhotplug.c | 1 + 1 file changed, 1 insertion(+) 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); } -- 2.39.5