On Thu, 24 Sep 2026 10:53:10 -0300
Jason Gunthorpe [off-list ref] wrote:
The two decompressors duplicate this call and the next patch needs to
change the argument. Hoist it up to remove the duplication.
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
quoted hunk ↗ jump to hunk
diff --git a/drivers/firmware/efi/libstub/zboot.c b/drivers/firmware/efi/libstub/zboot.c
index 4b76f74c56dae0..960a542881d875 100644
--- a/drivers/firmware/efi/libstub/zboot.c
+++ b/drivers/firmware/efi/libstub/zboot.c
@@ -92,9 +92,12 @@ efi_zboot_entry(efi_handle_t handle, efi_system_table_t *systab)
}
// Decompress the payload into the newly allocated buffer
- status = efi_zboot_decompress((void *)image_base, alloc_size) ?:
- efi_stub_common(handle, image, image_base, cmdline_ptr);
-
+ status = efi_zboot_decompress((void *)image_base, alloc_size);
+ if (status == EFI_SUCCESS) {
+ efi_cache_sync_image(image_base, alloc_size);
+ status =
+ efi_stub_common(handle, image, image_base, cmdline_ptr);
Just go one character longer!
quoted hunk ↗ jump to hunk
+ }
efi_free(alloc_size, image_base);
return status;
}