]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
acpi_memhotplug.c: remove memory info from list before freeing it
authorWen Congyang <wency@cn.fujitsu.com>
Thu, 25 Oct 2012 01:14:38 +0000 (12:14 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 29 Oct 2012 03:17:15 +0000 (14:17 +1100)
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 <wency@cn.fujitsu.com>
Cc: Len Brown <lenb@kernel.org>
Cc: "Brown, Len" <len.brown@intel.com>
Cc: Yasuaki ISIMATU <isimatu.yasuaki@jp.fujitsu.com>
Cc: David Rientjes <rientjes@google.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/acpi/acpi_memhotplug.c

index d97bb952a426ffd9fb9e115a917d5e54b6419ed3..8f529731c8ba01b3f1318c760a4a2c632180fed6 100644 (file)
@@ -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);
        }