Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 Apr 1997 22:10:40 -0500 (EST)
From:      Thomas David Rivers <ponds!rivers@dg-rtp.dg.com>
To:        ponds!freefall.cdrom.com!freebsd-hackers, ponds!dg.com!root, ponds!idi.ntnu.no!Tor.Egge
Subject:   Re: kern/3184: vnodes are used after they are freed.  (dup alloc?)
Message-ID:  <199704040310.WAA09093@lakes.water.net>

next in thread | raw e-mail | index | archive | help

Wow!

 I was _very_ excited by this report; especially since it seemed
to match the 'dup alloc' panic I've reported, and it was a timing
issue, and this is certainly the area where I get "dup alloc"s and
"free vnode isn't" panics...

 So, I applied the following diff to a 2.1.7 tree, which basically
moves the call to VOP_INACTIVE() until after the vnode has been
added to the free list (as Tor had described) [Tor - does this seem
to be what you intended?  The source in 2.1.7, of course, doesn't
have the SMP locking, etc....]:

*** vfs_subr.c.ori	Thu Aug 15 13:08:20 1996
--- vfs_subr.c	Thu Apr  3 20:07:46 1997
***************
*** 835,840 ****
--- 835,843 ----
  		panic("vrele: ref cnt");
  	}
  #endif
+ 
+ 	VOP_INACTIVE(vp);
+ 
  	if (vp->v_flag & VAGE) {
  		TAILQ_INSERT_HEAD(&vnode_free_list, vp, v_freelist);
  		vp->v_flag &= ~VAGE;
***************
*** 843,849 ****
  	}
  	freevnodes++;
  
- 	VOP_INACTIVE(vp);
  }
  
  /*
--- 846,851 ----




Unfortunately, I am still able to demonstrate my particular problem :-(

So, I'm beginning to wonder... is there a way a vnode can get
onto the freelist; but still be "busy" somehow...  Of hand,
is there a way to check for this condition I could add to the code
to see if that's what's going on?


	- Thanks -
	- Dave Rivers -



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