mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-13 15:03:58 +03:00
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>
This commit is contained in:
@@ -63,7 +63,8 @@ enum bootflow_flags_t {
|
||||
*
|
||||
* @bm_node: Points to siblings in the same bootdev
|
||||
* @glob_node: Points to siblings in the global list (all bootdev)
|
||||
* @dev: Bootdev device which produced this bootflow
|
||||
* @dev: Bootdev device which produced this bootflow, NULL for flows created by
|
||||
* BOOTMETHF_GLOBAL bootmeths
|
||||
* @blk: Block device which contains this bootflow, NULL if this is a network
|
||||
* device or sandbox 'host' device
|
||||
* @part: Partition number (0 for whole device)
|
||||
|
||||
Reference in New Issue
Block a user