Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: [netbsd-7] src/sys/ufs/ufs
Module Name: src
Committed By: snj
Date: Tue Nov 18 18:42:42 UTC 2014
Modified Files:
src/sys/ufs/ufs [netbsd-7]: ufs_extattr.c
Log Message:
Pull up following revision(s) (requested by manu in ticket #247):
sys/ufs/ufs/ufs_extattr.c: revision 1.45
Fix UFS1 extended attribute backend autocreation deadlock
UFS1 extended attribute backend autocration goes through a vn_open()
to create the backend file, and this forces us to release the lock
on the target node, in case the target is within the parents of the
backend file. That created a window within which another thread could
acquire a lock on the target vnode and deadlock awaiting for the
mount extended attribute lock.
We fix the problem by also releasing the mount extended attribute lock
when calling vn_open(), but that lets another thread race us for backend
creation. We just detect this using O_EXCL for vn_open() and by checking
for EEXIST return code. If we are raced, we fail backend creation but
this is not a problem since another thread succeeded on it: we just have
to use the result.
To generate a diff of this commit:
cvs rdiff -u -r1.43.4.1 -r1.43.4.2 src/sys/ufs/ufs/ufs_extattr.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