[PATCH 4/4] boot: bootflow_menu: fix crash for EFI BOOTMGR global bootmeth
Simon Glass
sjg at chromium.org
Wed Jun 12 22:24:22 CEST 2024
On Wed, 12 Jun 2024 at 08:58, Quentin Schulz <foss+uboot at 0leil.net> wrote:
>
> From: Quentin Schulz <quentin.schulz at cherry.de>
>
> The global bootmeths don't set the dev in bootflow struct which means
> the dev_get_parent(bflow->dev) triggers a NULL-pointer dereference and
> crash U-Boot.
>
> So before trying to handle a bootflow, check that the associated
> bootmeth isn't global, otherwise skip it.
>
> Suggested-by: Simon Glass <sjg at chromium.org>
> Signed-off-by: Quentin Schulz <quentin.schulz at cherry.de>
> ---
> boot/bootflow_menu.c | 7 +++++++
> include/bootflow.h | 3 ++-
> 2 files changed, 9 insertions(+), 1 deletion(-)
Reviewed-by: Simon Glass <sjg at chromium.org>
More information about the U-Boot
mailing list