NetBSD-Bugs archive

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

PR/42318 CVS commit: src/sys/kern

The following reply was made to PR kern/42318; it has been noted by GNATS.

From: Manuel Bouyer <>
Subject: PR/42318 CVS commit: src/sys/kern
Date: Sat, 28 Nov 2009 10:10:18 +0000

 Module Name:   src
 Committed By:  bouyer
 Date:          Sat Nov 28 10:10:18 UTC 2009
 Modified Files:
        src/sys/kern: vfs_subr.c
 Log Message:
 Previous did cause a deadlock with layered FS: the vrele thread
 can sleep on the vnode lock, while vget is sleeping on the
 VI_INACTNOW flag (or the vget caller is looping on vget returning failure
 because of the VI_INACTNOW flag). With layered FSes, the upper and lower
 vnodes share the same lock, so the vget() caller above can be already
 holding the vnode lock.
 Fix by dropping VI_INACTNOW before sleeping on the vnode lock in
 vrelel(), and check the ref count again once we have the lock. If the
 vnode has more than one reference, donc VOP_INACTIVE it.
 Fix PR kern/42318 and PR kern/42377
 patch tested by Hisashi T Fujinaka, Joachim König, Stephen Borrill and
 Matthias Scheler.
 To generate a diff of this commit:
 cvs rdiff -u -r1.391 -r1.392 src/sys/kern/vfs_subr.c
 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

Home | Main Index | Thread Index | Old Index