Home
last modified time | relevance | path

Searched hist:"0 b1d9deb" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/drivers/firmware/efi/libstub/
H A Drandomalloc.c0b1d9deb Tue Mar 07 17:21:34 CST 2023 Ard Biesheuvel <ardb@kernel.org> efi/libstub: randomalloc: Return EFI_OUT_OF_RESOURCES on failure

The logic in efi_random_alloc() will iterate over the memory map twice,
once to count the number of candidate slots, and another time to locate
the chosen slot after randomization.

If there is insufficient memory to do the allocation, the second loop
will run to completion without actually having located a slot, but we
currently return EFI_SUCCESS in this case, as we fail to initialize
status to the appropriate error value of EFI_OUT_OF_RESOURCES.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>