diff options
author | Quentin Schulz | 2024-06-12 16:58:49 +0200 |
---|---|---|
committer | Tom Rini | 2024-06-20 11:41:43 -0600 |
commit | 05b9665f095f2f70bf8de7ea6d1f5efc2ce7fb35 (patch) | |
tree | 94ae2f1edbdfed61d764ebb4c556158006d95a13 /include/bootflow.h | |
parent | 817316663626548f8e5b4d3019e4da957dcf2b59 (diff) |
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>
Diffstat (limited to 'include/bootflow.h')
-rw-r--r-- | include/bootflow.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/bootflow.h b/include/bootflow.h index 080ee850122..6affc5e1a4f 100644 --- a/include/bootflow.h +++ b/include/bootflow.h @@ -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) |