Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F145823601
D2404.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1002 B
Referenced Files
None
Subscribers
None
D2404.diff
View Options
Index: sys/vm/vm_page.c
===================================================================
--- sys/vm/vm_page.c
+++ sys/vm/vm_page.c
@@ -1633,6 +1633,7 @@
* vm_page_cache().
*/
mtx_lock_flags(&vm_page_queue_free_mtx, MTX_RECURSE);
+ m = NULL;
if (vm_cnt.v_free_count + vm_cnt.v_cache_count > vm_cnt.v_free_reserved ||
(req_class == VM_ALLOC_SYSTEM &&
vm_cnt.v_free_count + vm_cnt.v_cache_count > vm_cnt.v_interrupt_free_min) ||
@@ -1677,7 +1678,19 @@
}
#endif
}
- } else {
+ }
+
+ /*
+ * Can't allocate or attempted to and couldn't allocate a page
+ * given the current VM policy. Give up.
+ *
+ * Note - yes, this is one of the current shortcomings of the
+ * VM domain design - there's a global set of vm_cnt counters,
+ * and it's quite possible things will get unhappy with this.
+ * However without it'll kernel panic below - the code didn't
+ * check m == NULL here and would continue.
+ */
+ if (m == NULL) {
/*
* Not allocatable, give up.
*/
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Feb 25, 11:01 PM (13 h, 34 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28997004
Default Alt Text
D2404.diff (1002 B)
Attached To
Mode
D2404: Handle vm_phys returning NULL in vm_page_alloc()
Attached
Detach File
Event Timeline
Log In to Comment