Re: [patch 3/6] vfs: mountinfo stable peer group id

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

 



On Wed, Mar 19, 2008 at 05:41:15PM +0100, Miklos Szeredi wrote:
> > > From: Miklos Szeredi <mszeredi@xxxxxxx>
> > Um?  Do you ever need to take it outside of vfsmount_lock?
> > 
> 
> Tried to think this through:
> 
> It's always called with namespace_sem, which is enough, no need for a
> new lock.  The bigger problem, is that it _is_ called with
> vfsmount_lock in one case, which is bad, since the allocation may
> sleep.

It is called with vfsmount_lock in *all* cases.  You've missed one
in umount_tree(), BTW; you won't block in that case, though.

> That is in do_change_type().  But do we really need to hold
> vfsmount_lock in that case?

Not the issue.

>  I think not, the propagation tree has no
> relevance outside namespace_sem, so that one should be sufficient.

Callers manipulate more than propagation tree.  Note that e.g.
umount_tree() changes all sorts of data structures, including ones
that are traversed without namespace_sem.

I _really_ don't like the idea of different locking rules for caller
of a function depending on the value of argument of that function.
They are complicated enough as it is.

Argh...  OK, I'll try to put something together tonight, after I get some
sleep - 31 hours of uptime _suck_ ;-/  BTW, on top of everything else,
the current variant plays interesting games with CL_PROPAGATION behaviour
and I really don't like the look of what it's doing there.  Later...
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux