Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Jul 2010 08:43:28 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r209983 - stable/8/sys/kern
Message-ID:  <201007130843.o6D8hSrB072251@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Tue Jul 13 08:43:28 2010
New Revision: 209983
URL: http://svn.freebsd.org/changeset/base/209983

Log:
  MFC r209742:
  In revoke(), verify that VCHR vnode indeed belongs to devfs.

Modified:
  stable/8/sys/kern/vfs_syscalls.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/kern/vfs_syscalls.c
==============================================================================
--- stable/8/sys/kern/vfs_syscalls.c	Tue Jul 13 08:23:46 2010	(r209982)
+++ stable/8/sys/kern/vfs_syscalls.c	Tue Jul 13 08:43:28 2010	(r209983)
@@ -4209,7 +4209,7 @@ revoke(td, uap)
 	vfslocked = NDHASGIANT(&nd);
 	vp = nd.ni_vp;
 	NDFREE(&nd, NDF_ONLY_PNBUF);
-	if (vp->v_type != VCHR) {
+	if (vp->v_type != VCHR || vp->v_rdev == NULL) {
 		error = EINVAL;
 		goto out;
 	}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201007130843.o6D8hSrB072251>