diff options
author | dyson <dyson@FreeBSD.org> | 1998-05-04 17:12:53 +0000 |
---|---|---|
committer | dyson <dyson@FreeBSD.org> | 1998-05-04 17:12:53 +0000 |
commit | 65fbc3a74de21349fe64348f2de4d095b0b99372 (patch) | |
tree | f61dc7d8bc63d1fbcd55b3867f79153b39658eee /sys/kern/sysv_shm.c | |
parent | 0d10950020bb2e9176cfbfa3d461b9f99348ae00 (diff) | |
download | FreeBSD-src-65fbc3a74de21349fe64348f2de4d095b0b99372.zip FreeBSD-src-65fbc3a74de21349fe64348f2de4d095b0b99372.tar.gz |
Fix the shm panic. I mistakenly used the shadow_count to keep the object
from being split, and instead added an OBJ_NOSPLIT.
Diffstat (limited to 'sys/kern/sysv_shm.c')
-rw-r--r-- | sys/kern/sysv_shm.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/kern/sysv_shm.c b/sys/kern/sysv_shm.c index abc1765..25e03a2 100644 --- a/sys/kern/sysv_shm.c +++ b/sys/kern/sysv_shm.c @@ -1,4 +1,4 @@ -/* $Id: sysv_shm.c,v 1.35 1998/03/30 09:50:46 phk Exp $ */ +/* $Id: sysv_shm.c,v 1.36 1998/05/04 03:01:37 dyson Exp $ */ /* $NetBSD: sysv_shm.c,v 1.23 1994/07/04 23:25:12 glass Exp $ */ /* @@ -145,7 +145,6 @@ shm_deallocate_segment(shmseg) size_t size; shm_handle = shmseg->shm_internal; - shm_handle->shm_object->shadow_count--; vm_object_deallocate(shm_handle->shm_object); free((caddr_t)shm_handle, M_SHM); shmseg->shm_internal = NULL; @@ -504,8 +503,8 @@ shmget_allocate_segment(p, uap, mode) shm_handle->shm_object = vm_pager_allocate(OBJT_SWAP, 0, OFF_TO_IDX(size), VM_PROT_DEFAULT, 0); - shm_handle->shm_object->shadow_count++; shm_handle->shm_object->flags &= ~OBJ_ONEMAPPING; + shm_handle->shm_object->flags |= OBJ_NOSPLIT; shmseg->shm_internal = shm_handle; shmseg->shm_perm.cuid = shmseg->shm_perm.uid = cred->cr_uid; |