public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in sys-freebsd/freebsd-sources/files: freebsd-sources-6.2-random.patch freebsd-sources-6.2-sendfile.patch
@ 2008-05-17 19:54 Alexis Ballier (aballier)
  0 siblings, 0 replies; only message in thread
From: Alexis Ballier (aballier) @ 2008-05-17 19:54 UTC (permalink / raw
  To: gentoo-commits

aballier    08/05/17 19:54:28

  Added:                freebsd-sources-6.2-random.patch
                        freebsd-sources-6.2-sendfile.patch
  Log:
  Add security fixes for bug #212145 and bug #200959
  (Portage version: 2.1.5)

Revision  Changes    Path
1.1                  sys-freebsd/freebsd-sources/files/freebsd-sources-6.2-random.patch

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-freebsd/freebsd-sources/files/freebsd-sources-6.2-random.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-freebsd/freebsd-sources/files/freebsd-sources-6.2-random.patch?rev=1.1&content-type=text/plain

Index: freebsd-sources-6.2-random.patch
===================================================================
Index: sys/dev/random/yarrow.c
===================================================================
RCS file: /usr/ncvs/src/sys/dev/random/yarrow.c,v
retrieving revision 1.47
diff -u -r1.47 yarrow.c
--- sys/dev/random/yarrow.c	27 May 2007 18:54:58 -0000	1.47
+++ sys/dev/random/yarrow.c	27 Nov 2007 17:17:29 -0000
@@ -296,6 +296,7 @@
 				random_state.outputblocks = 0;
 			}
 			retval += (int)tomove;
+			cur = 0;
 		}
 	}
 	else {



1.1                  sys-freebsd/freebsd-sources/files/freebsd-sources-6.2-sendfile.patch

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-freebsd/freebsd-sources/files/freebsd-sources-6.2-sendfile.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-freebsd/freebsd-sources/files/freebsd-sources-6.2-sendfile.patch?rev=1.1&content-type=text/plain

Index: freebsd-sources-6.2-sendfile.patch
===================================================================
Index: sys/kern/kern_descrip.c
===================================================================
RCS file: /home/ncvs/src/sys/kern/kern_descrip.c,v
retrieving revision 1.313
diff -u -d -r1.313 kern_descrip.c
--- sys/kern/kern_descrip.c	6 Aug 2007 14:26:00 -0000	1.313
+++ sys/kern/kern_descrip.c	4 Feb 2008 19:05:42 -0000
@@ -2046,7 +2046,7 @@
 	int error;
 
 	*vpp = NULL;
-	if ((error = _fget(td, fd, &fp, 0, 0)) != 0)
+	if ((error = _fget(td, fd, &fp, flags, 0)) != 0)
 		return (error);
 	if (fp->f_vnode == NULL) {
 		error = EINVAL;
Index: sys/kern/uipc_syscalls.c
===================================================================
RCS file: /home/ncvs/src/sys/kern/uipc_syscalls.c,v
retrieving revision 1.259.2.1
diff -u -d -r1.259.2.1 uipc_syscalls.c
--- sys/kern/uipc_syscalls.c	1 Feb 2008 22:51:39 -0000	1.259.2.1
+++ sys/kern/uipc_syscalls.c	4 Feb 2008 19:05:42 -0000
@@ -1796,20 +1796,23 @@
 		goto out;
 	vfslocked = VFS_LOCK_GIANT(vp->v_mount);
 	vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td);
-	obj = vp->v_object;
-	if (obj != NULL) {
-		/*
-		 * Temporarily increase the backing VM object's reference
-		 * count so that a forced reclamation of its vnode does not
-		 * immediately destroy it.
-		 */
-		VM_OBJECT_LOCK(obj);
-		if ((obj->flags & OBJ_DEAD) == 0) {
-			vm_object_reference_locked(obj);
-			VM_OBJECT_UNLOCK(obj);
-		} else {
-			VM_OBJECT_UNLOCK(obj);
-			obj = NULL;
+	if (vp->v_type == VREG) {
+		obj = vp->v_object;
+		if (obj != NULL) {
+			/*
+			 * Temporarily increase the backing VM
+			 * object's reference count so that a forced
+			 * reclamation of its vnode does not
+			 * immediately destroy it.
+			 */
+			VM_OBJECT_LOCK(obj);
+			if ((obj->flags & OBJ_DEAD) == 0) {
+				vm_object_reference_locked(obj);
+				VM_OBJECT_UNLOCK(obj);
+			} else {
+				VM_OBJECT_UNLOCK(obj);
+				obj = NULL;
+			}
 		}
 	}
 	VOP_UNLOCK(vp, 0, td);



-- 
gentoo-commits@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-05-17 19:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-17 19:54 [gentoo-commits] gentoo-x86 commit in sys-freebsd/freebsd-sources/files: freebsd-sources-6.2-random.patch freebsd-sources-6.2-sendfile.patch Alexis Ballier (aballier)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox