Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: [netbsd-6] src/sys/ufs/ufs
Module Name: src
Committed By: snj
Date: Thu Dec 4 05:43:55 UTC 2014
Modified Files:
src/sys/ufs/ufs [netbsd-6]: ufs_extattr.c
Log Message:
Pull up following revision(s) (requested by manu in ticket #1197):
sys/ufs/ufs/ufs_extattr.c: revision 1.41, 1.45
Remove always-true condition and note that the current code is
suboptimal.
--
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.36.2.3 -r1.36.2.4 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