Commit 13c574fe authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull namespace fix from Al Viro:
 "Fix weird corner case in copy_mnt_ns()"

* tag 'pull-namespace' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  copy_mnt_ns(): handle a corner case (overmounted mntns bindings) saner
parents 75f4d9af 61d8e426
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -3515,8 +3515,9 @@ struct mnt_namespace *copy_mnt_ns(unsigned long flags, struct mnt_namespace *ns,
		q = next_mnt(q, new);
		if (!q)
			break;
		// an mntns binding we'd skipped?
		while (p->mnt.mnt_root != q->mnt.mnt_root)
			p = next_mnt(p, old);
			p = next_mnt(skip_mnt_tree(p), old);
	}
	namespace_unlock();