[PATCH master 06/39] efi: loader: fix EFI_ENTRY/EFI_EXIT ordering in efi_set_time
Ahmad Fatoum
a.fatoum at pengutronix.de
Mon Feb 16 00:44:06 PST 2026
When CONFIG_EFI_LOADER_SET_TIME is disabled, the function calls
EFI_EXIT(EFI_UNSUPPORTED) before EFI_ENTRY, corrupting the EFI
nesting depth counter. Move EFI_ENTRY before the IS_ENABLED check.
Co-Authored-By: Claude Opus 4.6 <noreply at anthropic.com>
Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
efi/loader/runtime.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/efi/loader/runtime.c b/efi/loader/runtime.c
index 4b3cb6df1350..f0fbd263fe55 100644
--- a/efi/loader/runtime.c
+++ b/efi/loader/runtime.c
@@ -240,11 +240,11 @@ static efi_status_t EFIAPI efi_set_time_boottime(struct efi_time *time)
struct rtc_time tm;
struct rtc_device *rtc;
+ EFI_ENTRY("%p", time);
+
if (!IS_ENABLED(CONFIG_EFI_LOADER_SET_TIME))
return EFI_EXIT(EFI_UNSUPPORTED);
- EFI_ENTRY("%p", time);
-
if (efi_validate_time(time)) {
ret = EFI_INVALID_PARAMETER;
goto out;
--
2.47.3
More information about the barebox
mailing list