[PATCH master 07/39] efi: runtime: fix missing EFI_EXIT in efirt_query_variable_info

Ahmad Fatoum a.fatoum at pengutronix.de
Mon Feb 16 00:44:07 PST 2026


Two early return paths after EFI_ENTRY() return raw EFI status codes
without going through EFI_EXIT(), corrupting the nesting depth
counter. Wrap both returns with EFI_EXIT().

Co-Authored-By: Claude Opus 4.6 <noreply at anthropic.com>
Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
 efi/runtime/services.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/efi/runtime/services.c b/efi/runtime/services.c
index 11a1c5cb6cb6..5044e16c7c5c 100644
--- a/efi/runtime/services.c
+++ b/efi/runtime/services.c
@@ -241,11 +241,11 @@ efirt_query_variable_info(u32 attributes,
 	EFI_ENTRY(L"");
 
 	if (!(attributes & EFI_VARIABLE_RUNTIME_ACCESS))
-		return EFI_INVALID_PARAMETER;
+		return EFI_EXIT(EFI_INVALID_PARAMETER);
 	if ((attributes & (EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS |
 			   EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS |
 			   EFI_VARIABLE_ENHANCED_AUTHENTICATED_ACCESS)))
-		return EFI_UNSUPPORTED;
+		return EFI_EXIT(EFI_UNSUPPORTED);
 
 	ret = efi_query_variable_info_int(attributes,
 					  maximum_variable_storage_size,
-- 
2.47.3




More information about the barebox mailing list