tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: extended attributes (need help)
Emmanuel Dreyfus <manu%netbsd.org@localhost> wrote:
> sys_extattr_set_file
> extattr_set_vp
> vn_lock
> VOP_SETEXTATTR
> ufs_setextattr
> ufs_extattr_set
> ufs_extattr_autocreate_attr
> *** VOP_UNLOCK added here ***
> namei
> VFS_ROOT
> vn_lock
> VOP_UNLOCK
> *** vn_lock added here ***
> VOP_UNLOCK
> vrele
>
> I wonder if there is room for a race condition.
Reading the code again, it seems safe do to that: I am not even sure we
need a lock on the vnode we set an extended attribute on, as it is left
untouched. We just lookup its credentials and struct mount.
This situation is specific to UFS1 and its file-backed extended
attribute, though. In the general case, a lock may be required. But
ufs_extattr_autocreate_attr is UFS1 specific anyway.
--
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu%netbsd.org@localhost
Home |
Main Index |
Thread Index |
Old Index