From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Rientjes Subject: Re: [PATCH 8/8] release memory resources if hotadd_new_pgdat() failed Date: Tue, 26 Jun 2012 21:29:11 -0700 (PDT) Message-ID: References: <4FE97DD5.6030205@cn.fujitsu.com> <4FE97F7B.2030808@cn.fujitsu.com> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Return-path: Received: from mail-pb0-f46.google.com ([209.85.160.46]:43353 "EHLO mail-pb0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750734Ab2F0E3O (ORCPT ); Wed, 27 Jun 2012 00:29:14 -0400 Received: by pbbrp8 with SMTP id rp8so994662pbb.19 for ; Tue, 26 Jun 2012 21:29:13 -0700 (PDT) In-Reply-To: <4FE97F7B.2030808@cn.fujitsu.com> Sender: linux-acpi-owner@vger.kernel.org List-Id: linux-acpi@vger.kernel.org To: Andrew Morton , Wen Congyang Cc: lenb@kernel.org, linux-acpi@vger.kernel.org, "linux-kernel@vger.kernel.org" , Yasuaki ISIMATU On Tue, 26 Jun 2012, Wen Congyang wrote: > We should goto error to release memory resource if hotadd_new_pgdat() failed. > > Signed-off-by: Wen Congyang > --- > mm/memory_hotplug.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c > index 2a14d35..3796690 100644 > --- a/mm/memory_hotplug.c > +++ b/mm/memory_hotplug.c > @@ -617,7 +617,7 @@ int __ref add_memory(int nid, u64 start, u64 size) > pgdat = hotadd_new_pgdat(nid, start); > ret = -ENOMEM; > if (!pgdat) > - goto out; > + goto error; > new_pgdat = 1; > } > This is a generic memory hotplug patch and doesn't rely on the rest of the series, so let's cc the maintainer, Andrew Morton . Acked-by: David Rientjes