Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753376AbdDKAQg (ORCPT ); Mon, 10 Apr 2017 20:16:36 -0400 Received: from mail-pf0-f174.google.com ([209.85.192.174]:35646 "EHLO mail-pf0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750761AbdDKAQe (ORCPT ); Mon, 10 Apr 2017 20:16:34 -0400 Date: Mon, 10 Apr 2017 17:16:32 -0700 (PDT) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Wei Yang cc: kirill@shutemov.name, bp@alien8.de, tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, tj@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/3] x86/numa_emulation: fix potential memory leak In-Reply-To: <20170410165652.50250-2-richard.weiyang@gmail.com> Message-ID: References: <20170410165652.50250-1-richard.weiyang@gmail.com> <20170410165652.50250-2-richard.weiyang@gmail.com> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 411 Lines: 11 On Tue, 11 Apr 2017, Wei Yang wrote: > numa_emulation() needs to allocate a space for phys_dist[] temporarily, > while current code may miss to release this when dfl_phys_nid == > NUMA_NO_NODE. It is observed in code review instead of in a real case. > > This patch fixes this by re-order the code path. > > Signed-off-by: Wei Yang Acked-by: David Rientjes