Page MenuHomeFreeBSD

D2404.diff
No OneTemporary

D2404.diff

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

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)

Event Timeline