Al Viro <viro@xxxxxxxxxxxxxxxxxx> writes: > On Mon, Aug 03, 2015 at 04:30:22PM -0500, Eric W. Biederman wrote: > >> + if (!is_subdir(nd->path.dentry, mnt->mnt_root)) >> + return false; > > Umm... What's to protect us from racing with d_move() right here? is_subdir does the read_seqretry on rename_lock. Which is enough to ensure connectivity exists at a single moment in time. Beyond that the entire path lookup races with d_move, and the code calls path_connected just after finding the parent directory, which ensures that in the moment that follow_dotdot is setting nd->dentry that the original nd->dentry is connected, and by extension the new as the new one is an ancestor. Or are you thinking of a different race? Eric -- 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