Re: [RFC] move_mount(2): still breakage around new mount detection

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

 



>         if (is_anon_ns(ns)) {
> 		/*
> 		 * Can't move the root of namespace into the same
> 		 * namespace.  Reject that early.
> 		 */
> 		if (ns == p->mnt)
> 			goto out;
> What am I missing here?

Seems good to me. Thanks.

> Another odd thing: what's the point rejecting move of /foo/bar/baz/ beneath
> /foo?  What's wrong with doing that?  _IF_ that's really intended, it needs
> at least a comment spelling that out.  TBH, for quite a while I'd been
> staring at that wondering WTF do you duplicate the common check for target
> not being a descendent of source, but with different error value.  Until
> spotting that the check is about _source_ being a descendent of target
> rather than the other way round...

You mean:

          for (struct mount *p = mnt_from; mnt_has_parent(p); p = p->mnt_parent)
                  if (p == mnt_to)
                          return -EINVAL;

I wasn't sure whether the resulting mount tree was sane under all
conditions for the service configuration update use-case. Feel free to
remove it.




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

  Powered by Linux