]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
acpi_memhotplug.c: remove memory info from list before freeing it
authorWen Congyang <wency@cn.fujitsu.com>
Fri, 28 Sep 2012 00:18:49 +0000 (10:18 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 10 Oct 2012 03:56:25 +0000 (14:56 +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);
        }