From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wen Congyang Subject: [PATCH 0.5/19] remove memory info from list before freeing it Date: Fri, 27 Jul 2012 18:24:58 +0800 Message-ID: <50126C7A.1000508@cn.fujitsu.com> References: <50126B83.3050201@cn.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Return-path: Received: from cn.fujitsu.com ([222.73.24.84]:34701 "EHLO song.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1751197Ab2G0KUW (ORCPT ); Fri, 27 Jul 2012 06:20:22 -0400 In-Reply-To: <50126B83.3050201@cn.fujitsu.com> Sender: linux-acpi-owner@vger.kernel.org List-Id: linux-acpi@vger.kernel.org To: linux-mm@kvack.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-acpi@vger.kernel.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, linux-ia64@vger.kernel.org, cmetcalf@tilera.com Cc: rientjes@google.com, liuj97@gmail.com, len.brown@intel.com, benh@kernel.crashing.org, paulus@samba.org, cl@linux.com, minchan.kim@gmail.com, akpm@linux-foundation.org, kosaki.motohiro@jp.fujitsu.com, Yasuaki ISIMATU We free info, but we forget to remove it from the list. It will cause unexpected problem when we access the list next time. Signed-off-by: Wen Congyang --- drivers/acpi/acpi_memhotplug.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/acpi/acpi_memhotplug.c b/drivers/acpi/acpi_memhotplug.c index 8fe0e02..5cafd6b 100644 --- a/drivers/acpi/acpi_memhotplug.c +++ b/drivers/acpi/acpi_memhotplug.c @@ -323,6 +323,7 @@ static int acpi_memory_disable_device(struct acpi_memory_device *mem_device) if (result) return result; } + list_del(&info->list); kfree(info); }