--- fs/namei.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/fs/namei.c b/fs/namei.c index 637b303ab08e..436c751fd724 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -984,6 +984,12 @@ static __always_inline void follow_dotdot(struct nameidata *nd) #endif spin_lock(&dcache_lock); if (nd->path.dentry != nd->path.mnt->mnt_root) { +#ifdef CONFIG_VE + if (nd->path.dentry == get_exec_env()->root_path.dentry) { + spin_unlock(&dcache_lock); + break; + } +#endif nd->path.dentry = dget(nd->path.dentry->d_parent); spin_unlock(&dcache_lock); dput(old); -- 2.1.4