tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: extended attributes (need help)

Emmanuel Dreyfus <> wrote:

> The patch I posted yesterday has a race condition, if a user process 
> quickly sets two attributes on two different filesystems, then the second
> one will panic on VFS_ROOT() in namei() because the root vnode is already
> locked. 

That analysis of the problem was wrong. The problem occured when setting
an attribute on the root vnode. In that case, the root vnode is locked
when entering ufs_extattr_autocreate_attr(), and calling vn_open() or
namei() cause a call to VFS_ROOT, which attempts to lock the already
locked vnode.

Solution is to test for vp->v_vflag & VV_ROOT and unlock the vnode
before calling vn_open or namei, and relocking it afterwards.

I will commit EA autocreation later today.

Emmanuel Dreyfus

Home | Main Index | Thread Index | Old Index