mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dave Young <dyoung@redhat.com>
To: Tyler Baicar <tbaicar@codeaurora.org>
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
Subject: Re: [PATCH 1/2] efi/esrt: fix unsupported version initialization failure
Date: Sat, 24 Feb 2018 15:20:54 +0800	[thread overview]
Message-ID: <20180224072054.GA3264@dhcp-128-65.nay.redhat.com> (raw)
In-Reply-To: <1519414953-5478-2-git-send-email-tbaicar@codeaurora.org>

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 <tbaicar@codeaurora.org>
> ---
>  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) {
> -- 
> 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.
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-efi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reviewed-by: Dave Young <dyoung@redhat.com>

Thanks
Dave

  reply	other threads:[~2018-02-24  7:21 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-23 19:42 [PATCH 0/2] ESRT fixes for relocatable kexec'd kernel Tyler Baicar
2018-02-23 19:42 ` [PATCH 1/2] efi/esrt: fix unsupported version initialization failure Tyler Baicar
2018-02-24  7:20   ` Dave Young [this message]
2018-03-08 16:11     ` Tyler Baicar
2018-03-08 18:00       ` Ard Biesheuvel
2018-03-08 18:15         ` Ard Biesheuvel
2018-03-08 18:34           ` Ard Biesheuvel
2018-02-23 19:42 ` [PATCH 2/2] efi/esrt: mark ESRT memory region as nomap Tyler Baicar
2018-02-24  7:22   ` Dave Young
2018-02-24  8:03   ` Ard Biesheuvel
2018-02-26 15:06     ` Tyler Baicar
2018-02-26 15:07       ` Ard Biesheuvel
2018-02-28  6:19 ` [PATCH 0/2] ESRT fixes for relocatable kexec'd kernel AKASHI Takahiro
2018-02-28 15:39   ` Jeffrey Hugo
2018-03-01  2:50     ` AKASHI Takahiro
2018-03-01 17:56       ` Tyler Baicar
2018-03-02  5:53         ` AKASHI Takahiro
2018-03-02 13:27           ` Tyler Baicar
2018-03-06  9:00             ` AKASHI Takahiro
2018-03-07 19:01               ` Tyler Baicar
2018-03-07 19:55               ` Ard Biesheuvel
2018-03-08 10:25                 ` AKASHI Takahiro

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180224072054.GA3264@dhcp-128-65.nay.redhat.com \
    --to=dyoung@redhat.com \
    --cc=ard.biesheuvel@linaro.org \
    --cc=jhugo@codeaurora.org \
    --cc=linux-efi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sgoel@codeaurora.org \
    --cc=takahiro.akashi@linaro.org \
    --cc=tbaicar@codeaurora.org \
    --cc=timur@codeaurora.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®