1
0
mirror of https://github.com/systemd/systemd.git synced 2026-01-16 20:36:13 +03:00
Files
systemd/src
Ricardo Salveti 803ef2a579 boot: handle empty initrd files (#40040)
Commit f8fa4222c9 added extra logic to
account for the size of the initrds before allocating the required memory pages,
but missed checking if the initrds were empty before allocating memory.

Extend the initrd options only when the initrd is valid, and add extra
check for validating that there is at least one valid initrd file before
allocating memory, fixing the following crash when booting with empty
initrd files:

src/boot/log.c:30@efi_assert: systemd-boot: Assertion
 'BS->AllocatePages(type, memory_type, n_pages, &addr) == EFI_SUCCESS'
failed at /usr/src/debug/systemd-boot/257.8/src/boot/util.h:95@xmalloc_pages, halting.

Fixes: f8fa4222c9
("boot: Make initrd_prepare() semantically equivalent to combine_initrds()")

(cherry picked from commit a40f4ba1a8)
2025-12-10 15:40:24 +00:00
..
2025-05-14 22:34:02 +02:00
2025-11-06 14:13:33 +00:00
2025-05-21 10:49:42 +02:00
2025-07-12 21:19:01 +09:00
2025-07-26 05:00:02 +09:00
2025-05-14 22:34:02 +02:00
2025-09-14 09:47:30 +02:00
2025-05-14 22:34:02 +02:00
2025-05-14 22:34:02 +02:00
2025-05-14 22:34:02 +02:00
2025-11-06 23:38:13 +00:00
2025-05-14 22:34:02 +02:00
2025-05-21 10:49:42 +02:00
2025-05-21 10:49:42 +02:00
2025-12-10 15:40:24 +00:00
2025-05-21 10:49:42 +02:00
2025-11-06 14:13:33 +00:00
2025-05-21 10:49:42 +02:00
2025-05-21 10:49:42 +02:00
2025-05-21 10:49:42 +02:00
2025-07-12 21:19:01 +09:00
2025-05-14 22:34:02 +02:00