git: 6230945b8819 - stable/14 - vm_phys_early_startup(): Panic if phys_avail[] is empty
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 08 Apr 2025 13:40:43 UTC
The branch stable/14 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=6230945b8819f51d2f46ea16a3437fdc91665f90 commit 6230945b8819f51d2f46ea16a3437fdc91665f90 Author: Olivier Certner <olce@FreeBSD.org> AuthorDate: 2024-10-28 16:59:57 +0000 Commit: Olivier Certner <olce@FreeBSD.org> CommitDate: 2025-04-08 13:38:22 +0000 vm_phys_early_startup(): Panic if phys_avail[] is empty Reviewed by: markj MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D48631 (cherry picked from commit 32e77bcdec5c034a9252876aa018f0bf34b36dbc) --- sys/vm/vm_phys.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/vm/vm_phys.c b/sys/vm/vm_phys.c index 10ce7e15f12a..92ac80d8d3bf 100644 --- a/sys/vm/vm_phys.c +++ b/sys/vm/vm_phys.c @@ -1834,6 +1834,9 @@ vm_phys_early_startup(void) struct vm_phys_seg *seg; int i; + if (phys_avail[1] == 0) + panic("phys_avail[] is empty"); + for (i = 0; phys_avail[i + 1] != 0; i += 2) { phys_avail[i] = round_page(phys_avail[i]); phys_avail[i + 1] = trunc_page(phys_avail[i + 1]);