aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firmware/efi/libstub/randomalloc.c
diff options
context:
space:
mode:
authorJakub Kicinski <[email protected]>2024-03-29 00:24:10 +0000
committerJakub Kicinski <[email protected]>2024-03-29 00:25:57 +0000
commit5e47fbe5cefe5d25d1fa4481c1b9fbe602b4a69f (patch)
treeb86edc39098cca1d0e53e46dceec6ca856183642 /drivers/firmware/efi/libstub/randomalloc.c
parentMerge tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf... (diff)
parentMerge tag 'net-6.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/netd... (diff)
downloadkernel-5e47fbe5cefe5d25d1fa4481c1b9fbe602b4a69f.tar.gz
kernel-5e47fbe5cefe5d25d1fa4481c1b9fbe602b4a69f.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Cross-merge networking fixes after downstream PR. No conflicts, or adjacent changes. Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'drivers/firmware/efi/libstub/randomalloc.c')
-rw-r--r--drivers/firmware/efi/libstub/randomalloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/firmware/efi/libstub/randomalloc.c b/drivers/firmware/efi/libstub/randomalloc.c
index 4e96a855fdf4..7e1852859550 100644
--- a/drivers/firmware/efi/libstub/randomalloc.c
+++ b/drivers/firmware/efi/libstub/randomalloc.c
@@ -120,7 +120,7 @@ efi_status_t efi_random_alloc(unsigned long size,
continue;
}
- target = round_up(md->phys_addr, align) + target_slot * align;
+ target = round_up(max(md->phys_addr, alloc_min), align) + target_slot * align;
pages = size / EFI_PAGE_SIZE;
status = efi_bs_call(allocate_pages, EFI_ALLOCATE_ADDRESS,