[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140815150544.GX27466@arm.com>
Date: Fri, 15 Aug 2014 16:05:44 +0100
From: Will Deacon <will.deacon@....com>
To: Dave Young <dyoung@...hat.com>
Cc: Matt Fleming <matt.fleming@...el.com>,
Catalin Marinas <Catalin.Marinas@....com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
"hpa@...or.com" <hpa@...or.com>,
Alessandro Zummo <a.zummo@...ertech.it>,
Leif Lindholm <leif.lindholm@...aro.org>,
Ard Biesheuvel <ard.biesheuvel@...aro.org>,
"msalter@...hat.com" <msalter@...hat.com>,
Randy Dunlap <rdunlap@...radead.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"linux-efi@...r.kernel.org" <linux-efi@...r.kernel.org>,
Daniel Kiper <daniel.kiper@...cle.com>,
Russ Anderson <rja@....com>
Subject: Re: [PATCH 4/7] arm64/efi: uefi_init error handling fix
On Thu, Aug 14, 2014 at 10:15:29AM +0100, Dave Young wrote:
> There's one early memmap leak in uefi_init error path, fix it and slightly tune
> the error handling code.
>
> Signed-off-by: Dave Young <dyoung@...hat.com>
Reported-by: Will Deacon <will.deacon@....com>
Acked-by: Will Deacon <will.deacon@....com>
Thanks for fixing this.
Will
> ---
> arch/arm64/kernel/efi.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arm64/kernel/efi.c b/arch/arm64/kernel/efi.c
> index e72f310..6ed0362 100644
> --- a/arch/arm64/kernel/efi.c
> +++ b/arch/arm64/kernel/efi.c
> @@ -89,7 +89,8 @@ static int __init uefi_init(void)
> */
> if (efi.systab->hdr.signature != EFI_SYSTEM_TABLE_SIGNATURE) {
> pr_err("System table signature incorrect\n");
> - return -EINVAL;
> + retval = -EINVAL;
> + goto out;
> }
> if ((efi.systab->hdr.revision >> 16) < 2)
> pr_warn("Warning: EFI system table version %d.%02d, expected 2.00 or greater\n",
> @@ -103,6 +104,7 @@ static int __init uefi_init(void)
> for (i = 0; i < (int) sizeof(vendor) - 1 && *c16; ++i)
> vendor[i] = c16[i];
> vendor[i] = '\0';
> + early_memunmap(c16, sizeof(vendor));
> }
>
> pr_info("EFI v%u.%.02u by %s\n",
> @@ -113,9 +115,8 @@ static int __init uefi_init(void)
> if (retval == 0)
> set_bit(EFI_CONFIG_TABLES, &efi.flags);
>
> - early_memunmap(c16, sizeof(vendor));
> +out:
> early_memunmap(efi.systab, sizeof(efi_system_table_t));
> -
> return retval;
> }
>
> --
> 1.8.3.1
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists