Module Name: src
Committed By: hannken
Date: Sat Apr 30 14:24:27 UTC 2011
Modified Files:
src/sys/ufs/ufs: ufs_vnops.c
Log Message:
ufs_mknod: change vnode type to VNON before it gets unlocked. Closes a small
window where the vnode could have type VCHR but op vector ffs_vnodeop_p.
To generate a diff of this commit:
cvs rdiff -u -r1.188 -r1.189 src/sys/ufs/ufs/ufs_vnops.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/ufs/ufs/ufs_vnops.c
diff -u src/sys/ufs/ufs/ufs_vnops.c:1.188 src/sys/ufs/ufs/ufs_vnops.c:1.189
--- src/sys/ufs/ufs/ufs_vnops.c:1.188 Sun Apr 24 21:35:30 2011
+++ src/sys/ufs/ufs/ufs_vnops.c Sat Apr 30 14:24:27 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: ufs_vnops.c,v 1.188 2011/04/24 21:35:30 rmind Exp $ */
+/* $NetBSD: ufs_vnops.c,v 1.189 2011/04/30 14:24:27 hannken Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -66,7 +66,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ufs_vnops.c,v 1.188 2011/04/24 21:35:30 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ufs_vnops.c,v 1.189 2011/04/30 14:24:27 hannken Exp $");
#if defined(_KERNEL_OPT)
#include "opt_ffs.h"
@@ -211,8 +211,8 @@
* checked to see if it is an alias of an existing entry in
* the inode cache.
*/
- VOP_UNLOCK(*vpp);
(*vpp)->v_type = VNON;
+ VOP_UNLOCK(*vpp);
vgone(*vpp);
error = VFS_VGET(mp, ino, vpp);
out: