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

Heinrich Schuchardt xypron.glpk at gmx.de
Thu Aug 24 17:25:02 CEST 2023


On 24.08.23 16:49, Ilias Apalodimas wrote:
> On Thu, 24 Aug 2023 at 17:47, Ilias Apalodimas
> <ilias.apalodimas at linaro.org> wrote:
>>
>> Hi Simon,
>>
>> On Thu, 24 Aug 2023 at 17:41, Simon Glass <sjg at google.com> wrote:
>>>
>>> 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?
>>
>> Not in -master.  I've sent it in the past [0].  But instead of merging
>> that series, we decided with Heinrich that a bigger cleanup was
>> needed.
>> So we had to do a bigger cleanup of protocol handling [1] [2]
>>
>
> Forgot the first link... apologize for the noise
> [0] https://lore.kernel.org/u-boot/20230601120625.1843555-2-ilias.apalodimas@linaro.org/
>
>> [1] https://lore.kernel.org/u-boot/20230620061932.113292-1-ilias.apalodimas@linaro.org/

This series is already merged.

>> [2] https://lore.kernel.org/u-boot/a222ec75-32ef-9dce-0855-afde2702c618@gmx.de/
>>
>> Once the last part gets merged, I'll rebase the test and send it over

This patch is also merged into origin main.

Best regards

Heinrich

>>
>> Thanks
>> /Ilias
>>>
>>> Regards,
>>> Simon



More information about the U-Boot mailing list