[PATCH v2] efi_loader: delete handle from events when a protocol is uninstalled

Simon Glass sjg at google.com
Thu Aug 24 16:41:25 CEST 2023


Hi Ilias,

On Thu, 24 Aug 2023 at 08:21, Ilias Apalodimas
<ilias.apalodimas at linaro.org> wrote:
>
> When a notification event is registered for a protocol the handle of the
> protocol is added in our event notification list.  When all the protocols
> of the handle are uninstalled we delete the handle but we do not remove
> it from the event notification list.
>
> Clean up the protocol removal functions and add a wrapper which
> - Removes the to-be deleted handle from any lists it participates
> - Remove the handle if no more protocols are present
>
> Signed-off-by: Ilias Apalodimas <ilias.apalodimas at linaro.org>
> ---
> Changes since v1:
> - use the non safe list traversing macros on efi_register_notify_events since
>   we don't delete anythig from that list
> - Add a comment explaining the code that preserves the handle in case of a
>   removal failure
>
>  lib/efi_loader/efi_boottime.c | 89 +++++++++++++++++++++++++----------
>  1 file changed, 65 insertions(+), 24 deletions(-)

Is there a test for this behaviour?

Regards,
Simon


More information about the U-Boot mailing list