]> git.dujemihanovic.xyz Git - u-boot.git/commit
boot: bootflow_menu: fix crash for EFI BOOTMGR global bootmeth
authorQuentin Schulz <quentin.schulz@cherry.de>
Wed, 12 Jun 2024 14:58:49 +0000 (16:58 +0200)
committerTom Rini <trini@konsulko.com>
Thu, 20 Jun 2024 17:41:43 +0000 (11:41 -0600)
commit05b9665f095f2f70bf8de7ea6d1f5efc2ce7fb35
tree94ae2f1edbdfed61d764ebb4c556158006d95a13
parent817316663626548f8e5b4d3019e4da957dcf2b59
boot: bootflow_menu: fix crash for EFI BOOTMGR global bootmeth

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@chromium.org>
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
boot/bootflow_menu.c
include/bootflow.h