freebsd-skq/sys/fs/nullfs
Konstantin Belousov effc6a3593 VOP_LOOKUP() may relock the directory vnode for some reasons. Since
nullfs vnode shares vnode lock with lower vnode, this allows the
reclamation of nullfs directory vnode in null_lookup().  In this
situation, VOP must return ENOENT.

More, since after the reclamation, the locks of nullfs directory vnode
and lower vnode are no longer shared, the relock of the ldvp does not
restore the correct locking state of dvp, and leaks ldvp lock.
Correct this by unlocking ldvp and locking dvp.

Use cached value of dvp->v_mount.

Reported by:	bdrewery
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
2014-08-08 11:39:05 +00:00
..
null_subr.c - Fix nullfs vnode reference leak in nullfs_reclaim_lowervp(). The 2013-05-11 11:17:44 +00:00
null_vfsops.c Do not leak the NULLV_NOUNLOCK flag from the nullfs_unlink_lowervp(), 2013-05-21 11:31:56 +00:00
null_vnops.c VOP_LOOKUP() may relock the directory vnode for some reasons. Since 2014-08-08 11:39:05 +00:00
null.h - Fix nullfs vnode reference leak in nullfs_reclaim_lowervp(). The 2013-05-11 11:17:44 +00:00