kernel - Fix missing chain wait
authorMatthew Dillon <dillon@apollo.backplane.com>
Sun, 25 Dec 2011 22:32:29 +0000 (14:32 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sun, 25 Dec 2011 22:32:29 +0000 (14:32 -0800)
* Fix a missing chain wait prior to adding a ref to the VM object in the
  sysv shm code.

Reported-by: lentferj
sys/kern/sysv_shm.c

index 01dc8bc..42768f3 100644 (file)
@@ -324,6 +324,7 @@ again:
 
        shm_handle = shmseg->shm_internal;
        vm_object_hold(shm_handle->shm_object);
+       vm_object_chain_wait(shm_handle->shm_object);
        vm_object_reference_locked(shm_handle->shm_object);
        rv = vm_map_find(&p->p_vmspace->vm_map, 
                         shm_handle->shm_object, 0,