Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/ufs/ufs ufs_mknod: change vnode type to VNON before it g...



details:   https://anonhg.NetBSD.org/src/rev/9bf13c810f88
branches:  trunk
changeset: 764675:9bf13c810f88
user:      hannken <hannken%NetBSD.org@localhost>
date:      Sat Apr 30 14:24:27 2011 +0000

description:
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.

diffstat:

 sys/ufs/ufs/ufs_vnops.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r 8f7c1990d9ce -r 9bf13c810f88 sys/ufs/ufs/ufs_vnops.c
--- a/sys/ufs/ufs/ufs_vnops.c   Sat Apr 30 12:25:05 2011 +0000
+++ b/sys/ufs/ufs/ufs_vnops.c   Sat Apr 30 14:24:27 2011 +0000
@@ -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.
         */
+       (*vpp)->v_type = VNON;
        VOP_UNLOCK(*vpp);
-       (*vpp)->v_type = VNON;
        vgone(*vpp);
        error = VFS_VGET(mp, ino, vpp);
 out:



Home | Main Index | Thread Index | Old Index