Received: by 10.223.185.116 with SMTP id b49csp6487598wrg; Thu, 8 Mar 2018 08:13:31 -0800 (PST) X-Google-Smtp-Source: AG47ELtul5Fq5AlZbP7WFu2sqV6PkMCvQw3rlncipJ4/w+CgZNt13ikXrhaCauxmq4fRCgkLMK4X X-Received: by 10.99.182.76 with SMTP id v12mr21168610pgt.158.1520525611669; Thu, 08 Mar 2018 08:13:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520525611; cv=none; d=google.com; s=arc-20160816; b=Ym9aWILD4TETOuxp3+1MTGBER7A8SNlfH8EazgGC48ihaSpG1W+7mX6IbvZAXWVIS6 PDEg5lez4V9CvyuSXtLN7FDHH1w23N/yndEuS31OqAwEt83MaZ/7GJCQbLrf7Nsnstwg Ljh2YrVBeOwH9P0FyB1rkVh95qzZxGWIQzGVKQivES4hofN9BeSTmsFZrYTmEboq9Y61 EmQSO9wmLxb3gKYfdnOdNw21BCoAuA8B/dZ7EXuQ1KTRTiGemH/4Ax69ZhaNtveL0KPt ZswgdJHQOXnCxvJiTWkB7O7tcRBsrJ8szo2Xm8nEsE9xtqLF6i3sZj7qvQ9/POeryyrN 1bGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dmarc-filter :dkim-signature:dkim-signature:arc-authentication-results; bh=xa5H9caWx10LSMpJT0sclZ8rin4Z+svZ/hiDFXd6zms=; b=YWna4cTXDEVYzPwGxBk1HJ1a+zg3mKRVH6/5ngUu/lphx9J1x/+uV/A3rZeeL+4dgT ei1T2ZZQ/9EAENgNesMVQtdMN5aaO2d8kBoKylZzNnwcSjR5jOHGizVjwIkOS16Dd/3A 51wNtKq6FzX2FtUEAgF/cmFnYviLAGOTQluKEJnWgDUNFDOZWNdhOBeTn3Z4c6I7zj8U uhu+O9575zeGsdIk+dskUTIloPxX1AoQ40pZ4FquYGCu+4h+wk3HGALkZNzx+tuIF718 HHPuAFAa3c6aeMcC4EkjqauX3oM7hLBsmela2nUXyyXxsusfK1CD3AQt/KaYiWt4QFOY vlxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=WQEWcR9f; dkim=pass header.i=@codeaurora.org header.s=default header.b=Bi8IIL6x; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j193si16022111pfc.408.2018.03.08.08.13.17; Thu, 08 Mar 2018 08:13:31 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=WQEWcR9f; dkim=pass header.i=@codeaurora.org header.s=default header.b=Bi8IIL6x; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935917AbeCHQLX (ORCPT + 99 others); Thu, 8 Mar 2018 11:11:23 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:51886 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752059AbeCHQLV (ORCPT ); Thu, 8 Mar 2018 11:11:21 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 879C86022C; Thu, 8 Mar 2018 16:11:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1520525480; bh=b6xy/8Ahc23xMp81jnTDgDjRGWQXuWOvl1XoQ5O6eyw=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=WQEWcR9fOLNjbejFFpL8GBQNw+S6ASAcUClxMgQB1sqrOQGkfHYehZD8z6L6fUUJF dq98UxqvJfAqlZlkSe7UiG8TdRLDLskZlBMQ/l8VeZ1BHmUWy1widK28Te7YkHpVXg ZWUvjXQFmFD8mf8XPESFu1pajnIx9sVqfBg8PzWo= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from [10.235.228.93] (global_nat1_iad_fw.qualcomm.com [129.46.232.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: tbaicar@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 2FCE76024C; Thu, 8 Mar 2018 16:11:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1520525479; bh=b6xy/8Ahc23xMp81jnTDgDjRGWQXuWOvl1XoQ5O6eyw=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=Bi8IIL6x0kZJ9q40XMc2s6iWVSRmhEthUKJqMIO2otO1BpFTgOqfJIYAjIpF8Dy5I RPP4TOmjjr8knLR/sh/xDGMg1BtyuYg1AocPpYLEjftZgBgmMBuhpVMnSIdYXtjDw3 Cznci5KNUQCESp+SP2eXAXbUS/5EdbaJElfRKdio= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 2FCE76024C Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=tbaicar@codeaurora.org Subject: Re: [PATCH 1/2] efi/esrt: fix unsupported version initialization failure To: Dave Young Cc: ard.biesheuvel@linaro.org, linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org, jhugo@codeaurora.org, sgoel@codeaurora.org, takahiro.akashi@linaro.org, timur@codeaurora.org References: <1519414953-5478-1-git-send-email-tbaicar@codeaurora.org> <1519414953-5478-2-git-send-email-tbaicar@codeaurora.org> <20180224072054.GA3264@dhcp-128-65.nay.redhat.com> From: Tyler Baicar Message-ID: Date: Thu, 8 Mar 2018 11:11:18 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180224072054.GA3264@dhcp-128-65.nay.redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/24/2018 2:20 AM, Dave Young wrote: > On 02/23/18 at 12:42pm, Tyler Baicar wrote: >> If ESRT initialization fails due to an unsupported version, the >> early_memremap allocation is never unmapped. This will cause an >> early ioremap leak. So, make sure to unmap the memory allocation >> before returning from efi_esrt_init(). >> >> Signed-off-by: Tyler Baicar >> --- >> drivers/firmware/efi/esrt.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/firmware/efi/esrt.c b/drivers/firmware/efi/esrt.c >> index c47e0c6..504f3c3 100644 >> --- a/drivers/firmware/efi/esrt.c >> +++ b/drivers/firmware/efi/esrt.c >> @@ -285,7 +285,7 @@ void __init efi_esrt_init(void) >> } else { >> pr_err("Unsupported ESRT version %lld.\n", >> tmpesrt.fw_resource_version); >> - return; >> + goto err_memunmap; >> } >> >> if (tmpesrt.fw_resource_count > 0 && max - size < entry_size) { >> -- > Reviewed-by: Dave Young Thank you Dave for your review here and input on the other patch. Ard, Can this patch be picked up? I understand patch 2 is not acceptable, but this one should be good to go I think. Thanks, Tyler -- Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.