From: Rob Clark <robdclark@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] efi_loader: fix TEST_PROTOCOL case in OpenProtocol()
Date: Sat, 16 Sep 2017 09:26:07 -0400 [thread overview]
Message-ID: <20170916132610.7939-1-robdclark@gmail.com> (raw)
In the TEST_PROTOCOL case, protocol_interface might be NULL, and at any
rate should not be touched. So skip efi_protocol_open() in this case.
Fixes: "efi_loader: open_info in OpenProtocol"
Signed-off-by: Rob Clark <robdclark@gmail.com>
---
lib/efi_loader/efi_boottime.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c
index 72a0c932a6..f1f0e021b9 100644
--- a/lib/efi_loader/efi_boottime.c
+++ b/lib/efi_loader/efi_boottime.c
@@ -1723,7 +1723,7 @@ efi_status_t EFIAPI efi_open_protocol(
}
r = efi_search_protocol(handle, protocol, &handler);
- if (r != EFI_SUCCESS)
+ if (r != EFI_SUCCESS || attributes == EFI_OPEN_PROTOCOL_TEST_PROTOCOL)
goto out;
r = efi_protocol_open(handler, protocol_interface, agent_handle,
--
2.13.5
next reply other threads:[~2017-09-16 13:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-16 13:26 Rob Clark [this message]
2017-09-17 8:21 ` [U-Boot] [PATCH] efi_loader: fix TEST_PROTOCOL case in OpenProtocol() Heinrich Schuchardt
2017-09-17 10:32 ` Rob Clark
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=20170916132610.7939-1-robdclark@gmail.com \
--to=robdclark@gmail.com \
--cc=u-boot@lists.denx.de \
/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