[PATCH 1/1] sandbox: fix sandbox_reset()

Simon Glass sjg at chromium.org
Sun Jul 4 22:15:30 CEST 2021


On Wed, 12 May 2021 at 10:39, Heinrich Schuchardt <xypron.glpk at gmx.de> wrote:
>
> state_uninit() and dm_uninit() are mutually exclusive:
>
> state_uninit() prints via drivers. So it cannot be executed after
> dm_uninit().
>
> dm_uninit() requires memory. So it cannot be executed after state_uninit()
> which releases all memory.
>
> Just skip dm_uninit() when resetting the sandbox. We will wake up in a new
> process and allocate new memory. So this cleanup is not required. We don't
> do it in sandbox_exit() either.
>
> This avoids a segmentation error when efi_reset_system_boottime() is
> invoked by a UEFI application.
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
> ---
>  arch/sandbox/cpu/start.c | 3 ---
>  1 file changed, 3 deletions(-)

Reviewed-by: Simon Glass <sjg at chromium.org>

Applied to u-boot-dm/next, thanks!


More information about the U-Boot mailing list