Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755206Ab2JVPfN (ORCPT ); Mon, 22 Oct 2012 11:35:13 -0400 Received: from mail-ob0-f174.google.com ([209.85.214.174]:54427 "EHLO mail-ob0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750921Ab2JVPfL (ORCPT ); Mon, 22 Oct 2012 11:35:11 -0400 MIME-Version: 1.0 In-Reply-To: References: <506C0AE8.40702@jp.fujitsu.com> <506C0C53.60205@jp.fujitsu.com> <50727984.20401@cn.fujitsu.com> <507E77D1.3030709@cn.fujitsu.com> <508118A6.80804@cn.fujitsu.com> <5082305A.2050108@cn.fujitsu.com> From: KOSAKI Motohiro Date: Mon, 22 Oct 2012 11:34:49 -0400 X-Google-Sender-Auth: CErLPN1NlwIs7z5jnFmobr2-Ua8 Message-ID: Subject: Re: [PATCH 1/4] acpi,memory-hotplug : add memory offline code to acpi_memory_device_remove() To: Wen Congyang Cc: Yasuaki Ishimatsu , x86@kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, rientjes@google.com, liuj97@gmail.com, len.brown@intel.com, cl@linux.com, minchan.kim@gmail.com, akpm@linux-foundation.org Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1117 Lines: 26 On Mon, Oct 22, 2012 at 11:11 AM, KOSAKI Motohiro wrote: >>> ?? >>> If resource was not allocated a driver, a driver doesn't need to >>> deallocate it when >>> error path. I haven't caught your point. >>> >> >> REMOVAL_NORMAL can be in 2 cases: >> 1. error path. If init call fails, we don't call it. We call this function >> only when something fails after init. >> 2. unbind the device from the driver. >> If we don't offline and remove memory when unbinding the device from the driver, >> the device may be out of control. When we eject this driver, we don't offline and > > Memory never be out of control by driver unloading. It is controled > from kernel core. It is an exception from regular linux driver model. Ah, got it. acpi_bus_hot_remove_device() evaluate PS3 before EJ0. Then your first patch may cause memory lost. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/