Now
netbsd-5 commitmail json YAML
src/sys/kern/vfs_subr.c@1.357.4.5
/
diff
/
nxr@1.357.4.5
src/sys/sys/vnode.h@1.197.4.1 / diff / nxr@1.197.4.1
src/sys/sys/vnode.h@1.197.4.1 / diff / nxr@1.197.4.1
Pull up following revision(s) (requested by rmind in ticket #863):
sys/sys/vnode.h: revision 1.207
sys/kern/vfs_subr.c: revision 1.379
put a flag bit into v_usecount to prevent vtryget during getcleanvnode.
this fixes the following deadlock.
a thread doing getcleanvnode:
pick a vnode
acqure v_interlock
v_usecount++
call vclean
now, another thread doing cache_lookup:
picks the vnode
vtryget succeed
vn_lock succeed
now in vclean:
set VI_XLOCK (too late to be noticed by the competing thread)
wait on the vnode lock (this might violate locking order)
the use of a flag bit was suggested by Andrew Doran. PR/41374.
sys/sys/vnode.h: revision 1.207
sys/kern/vfs_subr.c: revision 1.379
put a flag bit into v_usecount to prevent vtryget during getcleanvnode.
this fixes the following deadlock.
a thread doing getcleanvnode:
pick a vnode
acqure v_interlock
v_usecount++
call vclean
now, another thread doing cache_lookup:
picks the vnode
vtryget succeed
vn_lock succeed
now in vclean:
set VI_XLOCK (too late to be noticed by the competing thread)
wait on the vnode lock (this might violate locking order)
the use of a flag bit was suggested by Andrew Doran. PR/41374.