diff options
author | alc <alc@FreeBSD.org> | 2008-05-15 18:52:31 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2008-05-15 18:52:31 +0000 |
commit | 47efda9e75f987cc5e5a2ed381356d8750ec12be (patch) | |
tree | eedcca3d3196c8ae65b0dd60f9bb0d01afd45b0f /sys/vm/vm_page.c | |
parent | f4cf88c408e93a671cfbe142e3d738e7d133448f (diff) | |
download | FreeBSD-src-47efda9e75f987cc5e5a2ed381356d8750ec12be.zip FreeBSD-src-47efda9e75f987cc5e5a2ed381356d8750ec12be.tar.gz |
Don't call vm_reserv_alloc_page() on device-backed objects. Otherwise, the
system may panic because there is no reservation structure corresponding to
the physical address of the device memory.
Reported by: Giorgos Keramidas
Diffstat (limited to 'sys/vm/vm_page.c')
-rw-r--r-- | sys/vm/vm_page.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index 9fb3d36..2763042 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -1063,7 +1063,7 @@ vm_page_alloc(vm_object_t object, vm_pindex_t pindex, int req) mtx_unlock(&vm_page_queue_free_mtx); return (NULL); #if VM_NRESERVLEVEL > 0 - } else if (object == NULL || + } else if (object == NULL || object->type == OBJT_DEVICE || (object->flags & OBJ_COLORED) == 0 || (m = vm_reserv_alloc_page(object, pindex)) == NULL) { #else |