aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJacques Vidrine <nectar@FreeBSD.org>2004-02-05 18:01:26 +0000
committerJacques Vidrine <nectar@FreeBSD.org>2004-02-05 18:01:26 +0000
commit5087fc241c22e7289028c239b614abadaf20853b (patch)
treebf550dc78686ea5acdd397929442124b3d520650
parent14267b05ef0d98dafe9b4bfd1123d95fce4f2d22 (diff)
downloadsrc-5087fc241c22e7289028c239b614abadaf20853b.tar.gz
src-5087fc241c22e7289028c239b614abadaf20853b.zip
MFC sysv_shm.c 1.90: Correct a reference counting bug in shmat(2).
Notes
Notes: svn path=/releng/4.9/; revision=125489
-rw-r--r--UPDATING3
-rw-r--r--sys/conf/newvers.sh2
-rw-r--r--sys/kern/sysv_shm.c1
3 files changed, 5 insertions, 1 deletions
diff --git a/UPDATING b/UPDATING
index 2a46a2b5f9f9..9c8471111194 100644
--- a/UPDATING
+++ b/UPDATING
@@ -17,6 +17,9 @@ minimal number of processes, if possible, for that patch. For those
updates that don't have an advisory, or to be safe, you can do a full
build and install as described in the COMMON ITEMS section.
+20040205: p2 FreeBSD-SA-04:02.shmat
+ Correct a reference counting bug in shmat(2).
+
20031126: p1 FreeBSD-SA-03:19.bind
Corrected remote denial-of-service vulnerability in named(8).
diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh
index b3605b4e8311..44a1f1b79ed0 100644
--- a/sys/conf/newvers.sh
+++ b/sys/conf/newvers.sh
@@ -36,7 +36,7 @@
TYPE="FreeBSD"
REVISION="4.9"
-BRANCH="RELEASE-p1"
+BRANCH="RELEASE-p2"
RELEASE="${REVISION}-${BRANCH}"
VERSION="${TYPE} ${RELEASE}"
diff --git a/sys/kern/sysv_shm.c b/sys/kern/sysv_shm.c
index a27f61e1aa91..8056373e6381 100644
--- a/sys/kern/sysv_shm.c
+++ b/sys/kern/sysv_shm.c
@@ -318,6 +318,7 @@ shmat(p, uap)
rv = vm_map_find(&p->p_vmspace->vm_map, shm_handle->shm_object,
0, &attach_va, size, (flags & MAP_FIXED)?0:1, prot, prot, 0);
if (rv != KERN_SUCCESS) {
+ vm_object_deallocate(shm_handle->shm_object);
return ENOMEM;
}
vm_map_inherit(&p->p_vmspace->vm_map,