On 2/17/2017 9:07 PM, Bryan Drewery wrote: > Author: bdrewery > Date: Sat Feb 18 05:07:53 2017 > New Revision: 313909 > URL: https://svnweb.freebsd.org/changeset/base/313909 > > Log: > Fix panic with unlocked vnode to vrecycle(). > > MFC after: 2 weeks > > Modified: > head/sys/kern/uipc_mqueue.c > > Modified: head/sys/kern/uipc_mqueue.c > ============================================================================== > --- head/sys/kern/uipc_mqueue.c Sat Feb 18 01:52:10 2017 > (r313908) > +++ head/sys/kern/uipc_mqueue.c Sat Feb 18 05:07:53 2017 > (r313909) > @@ -714,7 +714,9 @@ do_recycle(void *context, int pending __ > { > struct vnode *vp = (struct vnode *)context; > > + vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); > vrecycle(vp); > + VOP_UNLOCK(vp, 0); > vdrop(vp); > } > >
Just looking at this, it seemed questionable and most likely bitrotted. I added the lock to avoid an assertion to unblock me and allow the module to be used by others with INVARIANTS. Most of the vnode handling here is from the initial commit, long before a lot of refactoring around vnode lifecycle management. It does appear to need someone more familiar with vnode handling to go through and clean it up. -- Regards, Bryan Drewery
signature.asc
Description: OpenPGP digital signature