cvs commit: src/sys/kern vfs_subr.c

Don Lewis truckman at
Wed Aug 10 16:56:58 GMT 2005

On 10 Aug, Kris Kennaway wrote:
> On Wed, Aug 10, 2005 at 11:46:03AM +0000, Alexander Kabaev wrote:
>> kan         2005-08-10 11:46:03 UTC
>>   FreeBSD src repository
>>   Modified files:
>>     sys/kern             vfs_subr.c 
>>   Log:
>>   Do not drop the vnode interlock if vdropl is called on already doomed vnode.
>>   vdropl callers expect it to return with interlock still being held.
> Does this fix panics some of us have been reporting?

It should get rid if the "lock (sleep mutex) vnode interlock not locked"
panic, but there is still a race condition in vlrureclaim(), which tests
this condition

                if ((vp->v_iflag & VI_DOOMED) != 0 || vp->v_usecount ||
                    !LIST_EMPTY(&(vp)->v_cache_src) || (vp->v_object != NULL &&
                    vp->v_object->resident_page_count > trigger)) {

before obtaining the vnode lock.  When vlrureclaim() calls VOP_LOCK() to
obtain the vnode lock, VOP_LOCK() drops the vnode interlock before it
obtains the vnode lock, so it is possible for these conditions to change
while waiting for the vnode lock or before the vnode interlock is
grabbed again.  I suspect that losing this race could have other
implications ...

More information about the cvs-src mailing list