[resend PATCH] bootdev: avoid infinite probe loop

Simon Glass sjg at chromium.org
Thu Jan 4 17:06:37 CET 2024


Hi Caleb,

On Thu, Jan 4, 2024 at 9:03 AM Caleb Connolly <caleb.connolly at linaro.org> wrote:
>
> Sometimes, when only one bootdev is available, and it fails to probe, we
> end up in an infinite loop calling probe() on the same device over and
> over. With only debug level log output.
>
> Break the loop if we fail to probe the same device twice in a row, and
> promote the probe failure message to log_warning().
>
> Signed-off-by: Caleb Connolly <caleb.connolly at linaro.org>
> ---
> Resend, actually change log message to WARN loglevel.
> ---
>  boot/bootdev-uclass.c | 14 ++++++++++++--
>  1 file changed, 12 insertions(+), 2 deletions(-)
>

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

Thanks for the fix. Is this something for which a test could be added?
One that fails (hangs) now but works with your patch?

Regards,
Simon


More information about the U-Boot mailing list