[PATCH] bootstd: Fix bootflow info for efi_mgr

Simon Glass sjg at chromium.org
Mon Oct 6 22:40:25 CEST 2025


On Fri, 3 Oct 2025 at 16:27, Sam Protsenko <semen.protsenko at linaro.org> wrote:
>
> A "Synchronous Abort" CPU exception happens on an attempt to run the
> "bootflow info" command for a global boot method (e.g. efi_mgr):
>
>     => bootflow select 0
>     => bootflow info
>
>     "Synchronous Abort" handler, esr 0x96000006, far 0x8
>
> It happens because do_bootflow_info() tries to dereference bflow->dev,
> which is NULL in case of efi_mgr. Add the corresponding check to prevent
> this NULL pointer dereference and make "bootflow info" command work
> properly for global boot methods.
>
> Fixes: 2d653f686b6d ("bootstd: Add a bootflow command")
> Signed-off-by: Sam Protsenko <semen.protsenko at linaro.org>
> ---
>  cmd/bootflow.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/cmd/bootflow.c b/cmd/bootflow.c
> index 551dffbb8b89..081f64e12ce9 100644
> --- a/cmd/bootflow.c
> +++ b/cmd/bootflow.c
> @@ -404,7 +404,7 @@ static int do_bootflow_info(struct cmd_tbl *cmdtp, int flag, int argc,
>         }
>
>         printf("Name:      %s\n", bflow->name);
> -       printf("Device:    %s\n", bflow->dev->name);
> +       printf("Device:    %s\n", bflow->dev ? bflow->dev->name : "(none)");
>         printf("Block dev: %s\n", bflow->blk ? bflow->blk->name : "(none)");
>         printf("Method:    %s\n", bflow->method->name);
>         printf("State:     %s\n", bootflow_state_get_name(bflow->state));
>
> base-commit: d33b21b7e261691e8d6613a24cc9b0ececba3b01
> --
> 2.39.5
>

Reviewed-by: Simon Glass <sjg at chromium.org>

If you like, you could an a test for this to bootflow_cmd_info()

Regards,
Simon


More information about the U-Boot mailing list