[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1519414953-5478-2-git-send-email-tbaicar@codeaurora.org>
Date: Fri, 23 Feb 2018 12:42:32 -0700
From: Tyler Baicar <tbaicar@...eaurora.org>
To: ard.biesheuvel@...aro.org, linux-efi@...r.kernel.org,
linux-kernel@...r.kernel.org, jhugo@...eaurora.org,
sgoel@...eaurora.org, takahiro.akashi@...aro.org,
timur@...eaurora.org
Cc: Tyler Baicar <tbaicar@...eaurora.org>
Subject: [PATCH 1/2] efi/esrt: fix unsupported version initialization failure
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@...eaurora.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.
Powered by blists - more mailing lists