Branch: refs/heads/master Home: https://github.com/tianocore/edk2 Commit: 73dbb68006caf538d1b69a11e306b161526932f3 https://github.com/tianocore/edk2/commit/73dbb68006caf538d1b69a11e306b161526932f3 Author: Mike Beaton <mjsbea...@gmail.com> Date: 2024-09-15 (Sun, 15 Sep 2024)
Changed paths: M NetworkPkg/HttpBootDxe/HttpBootImpl.c Log Message: ----------- NetworkPkg/HttpBootDxe: Correctly uninstall HttpBootCallbackProtocol The existing HttpBootUninstallCallback was passing the wrong handle (the PrivateData root controller handle, not the correct child IPv4 or IPv6 NIC controller handle; cf HttpBootInstallCallback for matching logic) and was also passing the address of a pointer to the interface to be removed rather than the pointer itself, so always failed with EFI_NOT_FOUND. This resulted in the prior behaviour that if multiple HTTP boot attempts were made, on the second and subsequent attempts the instance of this protocol installed by the first attempt would be re-used. As long as only one driver using the protocol is installed, this ends up producing the same results as if the protocol had been uninstalled then reinstalled correctly. After this commit, the protocol is installed at the start of an HTTP boot attempt and uninstalled it at the end of it (assuming nothing else has accessed the protocol in a way which blocks the uninstall). It might seem attractive to add an ASSERT to confirm when debugging that the uninstall succeeds as expected, but this is recommended against because uninstallation of protocol interfaces is allowed to fail under the UEFI model: https://edk2.groups.io/g/devel/message/117469. An ASSERT could therefore arise from a sequence of events which is perfectly valid - or at least is out of the control of this driver. Signed-off-by: Mike Beaton <mjsbea...@gmail.com> To unsubscribe from these emails, change your notification settings at https://github.com/tianocore/edk2/settings/notifications _______________________________________________ edk2-commits mailing list edk2-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-commits