From: "Vincent Stehlé" <vincent.stehle@arm.com>
To: Simon Glass <sjg@chromium.org>
Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org>,
u-boot@lists.denx.de, Ahmad Fatoum <a.fatoum@pengutronix.de>,
Heinrich Schuchardt <xypron.glpk@gmx.de>,
Tom Rini <trini@konsulko.com>
Subject: Re: [PATCH] efi_loader: add missing EFI_EXIT in efi_disconnect_controller
Date: Thu, 18 Jun 2026 17:48:58 +0200 [thread overview]
Message-ID: <ajQTatAxaa2nS5PV@debian> (raw)
In-Reply-To: <CAFLszTjXd441uA4-aF4AvUCFvdOvYdVCcEw8AZ12MrEaEyRuvQ@mail.gmail.com>
On Thu, Jun 18, 2026 at 04:27:00PM +0100, Simon Glass wrote:
> On Thu, 18 Jun 2026 at 16:21, Ilias Apalodimas
> <ilias.apalodimas@linaro.org> wrote:
> >
> > Hi Vincent,
> >
> >
> > On Thu, 18 Jun 2026 at 18:19, Simon Glass <sjg@chromium.org> wrote:
> >>
> >> Hi Vincent,
> >>
> >> On Thu, 18 Jun 2026 at 16:09, Vincent Stehlé <vincent.stehle@arm.com> wrote:
> >> >
> >> > Make sure to call EFI_EXIT() in efi_disconnect_controller(), when returning
> >> > after having called EFI_ENTRY().
> >> >
> >> > This is inspired by a barebox fix. [1]
> >>
> >> Hmm, does Barebox support EFI_LOADER now? I wish we could bring these
> >> projects back together :-)
> >>
> >> >
> >> > Link: https://git.pengutronix.de/cgit/barebox/commit/?id=080db65e39a877b000baaf843c997a69821dfe69 [1]
> >> > Fixes: 314bed6c854e ("efi_loader: fix DisconnectController() for sole child")
> >> > Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com>
> >> > Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
> >> > Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org>
> >> > Cc: Tom Rini <trini@konsulko.com>
> >> > ---
> >> > lib/efi_loader/efi_boottime.c | 2 +-
> >> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >> >
> >> > diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c
> >> > index de57823bd44..b6966652d97 100644
> >> > --- a/lib/efi_loader/efi_boottime.c
> >> > +++ b/lib/efi_loader/efi_boottime.c
> >> > @@ -3895,7 +3895,7 @@ efi_status_t EFIAPI efi_disconnect_controller(
> >> > &number_of_children,
> >> > &child_handle_buffer);
> >> > if (r != EFI_SUCCESS)
> >> > - return r;
> >> > + return EFI_EXIT(r);
> >
> >
> > Any reason we can just goto out;
>
> +1...every other error path uses 'goto out' so the single EFI_EXIT()
> at the bottom handles things - child_handle_buffer is initialised to
> NULL so the free() at out is safe.
Hi,
I think you are right; I will send a v2.
Best regards,
Vincent.
>
> >
> > Thanks
> > /Ilias
> >>
> >> > sole_child = (number_of_children == 1);
> >> >
> >> > if (child_handle) {
> >> > --
> >> > 2.53.0
>
> Regards,
> Simon
next prev parent reply other threads:[~2026-06-18 15:49 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-18 15:09 [PATCH] efi_loader: add missing EFI_EXIT in efi_disconnect_controller Vincent Stehlé
2026-06-18 15:18 ` Simon Glass
2026-06-18 15:20 ` Ilias Apalodimas
2026-06-18 15:27 ` Simon Glass
2026-06-18 15:48 ` Vincent Stehlé [this message]
2026-06-18 15:28 ` Ahmad Fatoum
2026-06-18 15:33 ` Vincent Stehlé
2026-06-18 16:09 ` [PATCH v2] efi_loader: fix " Vincent Stehlé
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ajQTatAxaa2nS5PV@debian \
--to=vincent.stehle@arm.com \
--cc=a.fatoum@pengutronix.de \
--cc=ilias.apalodimas@linaro.org \
--cc=sjg@chromium.org \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
--cc=xypron.glpk@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox