NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
PR/41374 CVS commit: src/sys
The following reply was made to PR kern/41374; it has been noted by GNATS.
From: YAMAMOTO Takashi <yamt%netbsd.org@localhost>
To: gnats-bugs%gnats.NetBSD.org@localhost
Cc:
Subject: PR/41374 CVS commit: src/sys
Date: Sat, 16 May 2009 08:29:54 +0000
Module Name: src
Committed By: yamt
Date: Sat May 16 08:29:54 UTC 2009
Modified Files:
src/sys/kern: vfs_subr.c
src/sys/sys: vnode.h
Log Message:
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.
To generate a diff of this commit:
cvs rdiff -u -r1.378 -r1.379 src/sys/kern/vfs_subr.c
cvs rdiff -u -r1.206 -r1.207 src/sys/sys/vnode.h
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