audk/NetworkPkg/HttpBootDxe
Mike Beaton 73dbb68006 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 <mjsbeaton@gmail.com>
2024-09-15 21:18:08 +00:00
..
HttpBootClient.c NetworkPkg/HttpBootDxe: Resume an interrupted boot file download. 2024-09-13 10:26:09 +00:00
HttpBootClient.h NetworkPkg/HttpBootDxe: Resume an interrupted boot file download. 2024-09-13 10:26:09 +00:00
HttpBootComponentName.c NetworkPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
HttpBootComponentName.h NetworkPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:15 -07:00
HttpBootConfig.c NetworkPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
HttpBootConfig.h NetworkPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
HttpBootConfigNVDataStruc.h NetworkPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
HttpBootConfigStrings.uni NetworkPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:15 -07:00
HttpBootConfigVfr.vfr NetworkPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:15 -07:00
HttpBootDhcp4.c NetworkPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
HttpBootDhcp4.h NetworkPkg/HttpBootDxe: Add LOONGARCH64 architecture for EDK2 CI. 2022-10-14 02:16:33 +00:00
HttpBootDhcp6.c NetworkPkg: SECURITY PATCH CVE-2023-45237 2024-05-24 15:48:52 +00:00
HttpBootDhcp6.h NetworkPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
HttpBootDxe.c NetworkPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
HttpBootDxe.h NetworkPkg/HttpBootDxe: Resume an interrupted boot file download. 2024-09-13 10:26:09 +00:00
HttpBootDxe.inf NetworkPkg/HttpBootDxe: Resume an interrupted boot file download. 2024-09-13 10:26:09 +00:00
HttpBootDxe.uni NetworkPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:15 -07:00
HttpBootDxeExtra.uni NetworkPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:15 -07:00
HttpBootImpl.c NetworkPkg/HttpBootDxe: Correctly uninstall HttpBootCallbackProtocol 2024-09-15 21:18:08 +00:00
HttpBootImpl.h NetworkPkg: Improve GetBootFile() code flow 2024-08-27 01:55:39 +00:00
HttpBootSupport.c NetworkPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
HttpBootSupport.h NetworkPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00