On Mon, Jul 4, 2022 at 12:55 PM Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote: > > You are checking the wrong thing here. It's really about mount_lock - > ->d_seq is *not* bumped when we or attach in some namespace. I think we're talking past each other. Yes, we need to check the mount sequence lock too, because we're doing that mount traversal. But I think we *also* need to check the dentry sequence count, because the dentry itself could have been moved to another parent. The two are entirely independent, aren't they? And the dentry sequence point check should go along with the "we're now updating the sequence point from the old dentry to the new". The mount point check should go around the "check dentry mount point", but it's a separate issue from the whole "we are now jumping to a different dentry, we should check that the previous dentry hasn't changed". Linus