Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177291302
D48627.1794100035.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
D48627.1794100035.diff
View Options
diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c
--- a/sys/vm/vm_page.c
+++ b/sys/vm/vm_page.c
@@ -750,8 +750,7 @@
* physical pages.
*/
for (i = 0; phys_avail[i + 1] != 0; i += 2)
- if (vm_phys_avail_size(i) != 0)
- vm_phys_add_seg(phys_avail[i], phys_avail[i + 1]);
+ vm_phys_add_seg(phys_avail[i], phys_avail[i + 1]);
/*
* Initialize the physical memory allocator.
diff --git a/sys/vm/vm_phys.c b/sys/vm/vm_phys.c
--- a/sys/vm/vm_phys.c
+++ b/sys/vm/vm_phys.c
@@ -476,10 +476,18 @@
{
vm_paddr_t paddr;
- KASSERT((start & PAGE_MASK) == 0,
- ("vm_phys_define_seg: start is not page aligned"));
- KASSERT((end & PAGE_MASK) == 0,
- ("vm_phys_define_seg: end is not page aligned"));
+ if ((start & PAGE_MASK) != 0)
+ panic("%s: start (%jx) is not page aligned", __func__,
+ (uintmax_t)start);
+ if ((end & PAGE_MASK) != 0)
+ panic("%s: end (%jx) is not page aligned", __func__,
+ (uintmax_t)end);
+ if (start > end)
+ panic("%s: start (%jx) > end (%jx)!", __func__,
+ (uintmax_t)start, (uintmax_t)end);
+
+ if (start == end)
+ return;
/*
* Split the physical memory segment if it spans two or more free
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 8, 1:07 AM (17 h, 59 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41559717
Default Alt Text
D48627.1794100035.diff (1 KB)
Attached To
Mode
D48627: vm_phys_add_seg(): Check for bad segments, allow empty ones
Attached
Detach File
Event Timeline