boot/bootm: Disable interrupts after loading the image

Simon Glass sjg at chromium.org
Mon Mar 30 19:07:13 CEST 2026


Hi J,

On 2026-03-29T15:17:33, J. Neuschäfer via B4 Relay
<devnull+j.ne.posteo.net at kernel.org> wrote:
> diff --git a/boot/bootm.c b/boot/bootm.c
> @@ -1044,6 +1043,8 @@ int bootm_run_states(struct bootm_info *bmi, int states)
> +     iflag = bootm_disable_interrupts();
> +
> +     /* From now on, we need the OS boot function */
> +     if (ret)
> +             return ret;

If `ret` is non-zero from the RAMDISK or FDT processing stages, this
returns immediately with interrupts left disabled. I thinik it should
'goto err'

Also, the original code only disabled interrupts when
`BOOTM_STATE_LOADOS` was set. With this change, interrupts are now
disabled unconditionally for all callers of `bootm_run_states()`. Is
that the intended behaviour? I suggest associating it with
BOOTM_STATE_OS_GO instead.

Regards,
Simon


More information about the U-Boot mailing list