* Matt Fleming <[email protected]> wrote:

> From: Jeffrey Hugo <[email protected]>
> 
> The spec allows ExitBootServices to fail with EFI_INVALID_PARAMETER if a
> race condition has occurred where the EFI has updated the memory map after
> the stub grabbed a reference to the map.  The spec defines a retry
> proceedure with specific requirements to handle this scenario.
> 
> This scenario was previously observed on x86 - commit d3768d885c6c ("x86,
> efi: retry ExitBootServices() on failure") but the current fix is not spec
> compliant and the scenario is now observed on the Qualcomm Technologies
> QDF2432 via the FDT stub which does not handle the error and thus causes
> boot failures.

It's unclear what this 'scenario' is. How does the user notice?

> Add a helper to the stub library that correctly adhears to the spec in the
> case of EFI_INVALID_PARAMETER from ExitBootServices and can be universally
> used across all stub implementations.

s/'adheres to'

> +             status = efi_call_early(exit_boot_services, handle,
> +                                     *map->key_ptr);

Please don't add spurious linebreaks in such a case - just keep it a bit longer 
than col80.

> +     if (status != EFI_SUCCESS)
> +             /* exit_boot_services() was called, thus cannot free*/
> +             goto fail;

Non-standard comment format and comment placement.

Thanks,

        Ingo

Reply via email to