Message ID | 53ae7c223875633ee8246b6139b226aa16e0512e.1671098103.git.baskov@ispras.ru (mailing list archive) |
---|---|
State | Handled Elsewhere |
Headers | show |
Series | x86_64: Improvements at compressed kernel stage | expand |
diff --git a/drivers/firmware/efi/libstub/mem.c b/drivers/firmware/efi/libstub/mem.c index b31d1975caa2..50a0b649b75a 100644 --- a/drivers/firmware/efi/libstub/mem.c +++ b/drivers/firmware/efi/libstub/mem.c @@ -249,6 +249,9 @@ efi_status_t efi_adjust_memory_range_protection(unsigned long start, efi_physical_addr_t rounded_start, rounded_end; unsigned long attr_clear; + if (size == 0) + return EFI_INVALID_PARAMETER; + /* * This function should not be used to modify attributes * other than writable/executable.