Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752918AbcJCTvl (ORCPT ); Mon, 3 Oct 2016 15:51:41 -0400 Received: from mail-wm0-f45.google.com ([74.125.82.45]:36847 "EHLO mail-wm0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751500AbcJCTve (ORCPT ); Mon, 3 Oct 2016 15:51:34 -0400 Date: Mon, 3 Oct 2016 20:51:31 +0100 From: Matt Fleming To: Yisheng Xie Cc: will.deacon@arm.com, mingo@kernel.org, guohanjun@huawei.com, mark.rutland@arm.com, catalin.marinas@arm.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-efi@vger.kernel.org, ard.biesheuvel@linaro.org Subject: Re: [PATCH -next v2] arm*/efi: efi_init error handling fix Message-ID: <20161003195131.GK16071@codeblueprint.co.uk> References: <1474371593-10250-1-git-send-email-xieyisheng1@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1474371593-10250-1-git-send-email-xieyisheng1@huawei.com> User-Agent: Mutt/1.5.24+41 (02bc14ed1569) (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 788 Lines: 26 On Tue, 20 Sep, at 07:39:53PM, Yisheng Xie wrote: > There's an early memmap leak in efi_init error path, fix it. > > Signed-off-by: Yisheng Xie > --- > drivers/firmware/efi/arm-init.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/firmware/efi/arm-init.c b/drivers/firmware/efi/arm-init.c > index 9f8d996..7c2fe57 100644 > --- a/drivers/firmware/efi/arm-init.c > +++ b/drivers/firmware/efi/arm-init.c > @@ -245,8 +245,10 @@ void __init efi_init(void) > "Unexpected EFI_MEMORY_DESCRIPTOR version %ld", > efi.memmap.desc_version); > > - if (uefi_init() < 0) > + if (uefi_init() < 0) { > + efi_memmap_unmap(); > return; > + } > > reserve_regions(); > efi_memattr_init(); Thanks, applied to 'next'.