[U-Boot] [PATCH 2/4] efi_loader: check interface when uninstalling protocol

Heinrich Schuchardt xypron.glpk at gmx.de
Fri May 11 10:09:21 UTC 2018


The interface has to be checked in UninstallProtocolInterface.

Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
---
 lib/efi_loader/efi_boottime.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c
index 5e4089df621..bfaef29d3e6 100644
--- a/lib/efi_loader/efi_boottime.c
+++ b/lib/efi_loader/efi_boottime.c
@@ -494,6 +494,8 @@ efi_status_t efi_remove_protocol(const efi_handle_t handle,
 		return ret;
 	if (guidcmp(handler->guid, protocol))
 		return EFI_INVALID_PARAMETER;
+	if (handler->protocol_interface != protocol_interface)
+		return EFI_INVALID_PARAMETER;
 	list_del(&handler->link);
 	free(handler);
 	return EFI_SUCCESS;
-- 
2.17.0



More information about the U-Boot mailing list