mirror of
https://github.com/opnsense/src.git
synced 2026-06-06 07:12:52 -04:00
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
This commit is contained in:
parent
e1499bfff8
commit
32e77bcdec
1 changed files with 3 additions and 0 deletions
|
|
@ -2017,6 +2017,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]);
|
||||
|
|
|
|||
Loading…
Reference in a new issue