diff options
-rw-r--r-- | vm/vm_resident.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/vm/vm_resident.c b/vm/vm_resident.c index cc7b809..3d3a76d 100644 --- a/vm/vm_resident.c +++ b/vm/vm_resident.c @@ -784,8 +784,10 @@ vm_page_t vm_page_grab( mem = vm_page_alloc_pa(0, VM_PAGE_SEL_DIRECTMAP, VM_PT_KERNEL); - if (mem == NULL) - panic("vm_page_grab"); + if (mem == NULL) { + simple_unlock(&vm_page_queue_free_lock); + return NULL; + } if (external) vm_page_external_count++; |