]> 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, 13 Sep 2012 00:58:16 +0000 (10:58 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 20 Sep 2012 07:04:46 +0000 (17:04 +1000)
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);
        }