]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[efi] Defer local download process until file has been opened
authorMichael Brown <mcb30@ipxe.org>
Tue, 13 Oct 2020 18:08:25 +0000 (19:08 +0100)
committerMichael Brown <mcb30@ipxe.org>
Tue, 13 Oct 2020 18:18:41 +0000 (19:18 +0100)
commit02748d0a584f22a568347d719291725e6fd63029
treede4cfbb29ee9dd6b41a99fcd8d48fb878755fcfd
parent6d680bdec59b103f84ee922ec66ae5219c939938
[efi] Defer local download process until file has been opened

When iPXE is downloading a file from an EFI_FILE_PROTOCOL instance
backed by an EFI_BLOCK_IO_PROTOCOL instance provided by the same iPXE
binary (e.g. via a hooked SAN device), then it is possible for step()
to be invoked as a result of the calls into the EFI_BLOCK_IO_PROTOCOL
methods.  This can potentially result in efi_local_step() being run
prematurely, before the file has been opened and before the parent
interface has been attached.

Fix by deferring starting the download process until immediately prior
to returning from efi_local_open().

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/interface/efi/efi_local.c