Source-Changes-HG archive

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

[src/netbsd-1-5]: src/sys/ufs/ufs Pull up revision 1.77 (requested by wrstuden):



details:   https://anonhg.NetBSD.org/src/rev/808c6a6cf302
branches:  netbsd-1-5
changeset: 491190:808c6a6cf302
user:      he <he%NetBSD.org@localhost>
date:      Fri Apr 06 00:03:51 2001 +0000

description:
Pull up revision 1.77 (requested by wrstuden):
  Explicitly VOP_UNLOCK before setting v_op to spec_vnode_ops_p.
  Works around a lock leak and eventual kernel panic.

diffstat:

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

diffs (21 lines):

diff -r 419f94092fdf -r 808c6a6cf302 sys/ufs/ufs/ufs_vnops.c
--- a/sys/ufs/ufs/ufs_vnops.c   Fri Apr 06 00:03:33 2001 +0000
+++ b/sys/ufs/ufs/ufs_vnops.c   Fri Apr 06 00:03:51 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ufs_vnops.c,v 1.68.2.3 2000/10/19 14:15:14 he Exp $    */
+/*     $NetBSD: ufs_vnops.c,v 1.68.2.4 2001/04/06 00:03:51 he Exp $    */
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1993, 1995
@@ -1919,8 +1919,10 @@
                         */
                        nvp->v_data = vp->v_data;
                        vp->v_data = NULL;
+                       /* XXX spec_vnodeops has no locking, do it explicitly */
+                       VOP_UNLOCK(vp, 0);
                        vp->v_op = spec_vnodeop_p;
-                       vput(vp);
+                       vrele(vp);
                        vgone(vp);
                        lockmgr(&nvp->v_lock, LK_EXCLUSIVE, &nvp->v_interlock);
                        /*



Home | Main Index | Thread Index | Old Index