[PATCH] efi_loader: Uninstall the TCG2 protocol if logging s-crtm fails
Heinrich Schuchardt
xypron.glpk at gmx.de
Tue May 11 08:33:30 CEST 2021
On 5/10/21 8:19 PM, Ilias Apalodimas wrote:
> Instead of just failing, clean up the installed config table and
> EventLog memory if logging an s-crtm event fails during the protocol
> installation
>
> Signed-off-by: Ilias Apalodimas <ilias.apalodimas at linaro.org>
> ---
> lib/efi_loader/efi_tcg2.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/efi_loader/efi_tcg2.c b/lib/efi_loader/efi_tcg2.c
> index 570cc746ed4e..8f8a26e7b7ae 100644
> --- a/lib/efi_loader/efi_tcg2.c
> +++ b/lib/efi_loader/efi_tcg2.c
> @@ -1113,7 +1113,7 @@ efi_status_t efi_tcg2_register(void)
>
When merging I will replace the only 'goto out;' above in this function
by 'return ret;' to get rid of the label.
Reviewed-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
> ret = efi_append_scrtm_version(dev);
> if (ret != EFI_SUCCESS)
> - goto out;
> + goto fail;
>
> ret = efi_add_protocol(efi_root, &efi_guid_tcg2_protocol,
> (void *)&efi_tcg2_protocol);
>
More information about the U-Boot
mailing list