diff --git a/fs/dcache.c b/fs/dcache.c index 9b5fe503f6cb6c8d76044bb8272084fdb0474c9b..e3b44ca75a1b3ab2a1099197c46c604d169b37d5 100644 --- a/fs/dcache.c +++ b/fs/dcache.c @@ -2926,6 +2926,13 @@ static int prepend_path(const struct path *path, if (dentry == vfsmnt->mnt_root || IS_ROOT(dentry)) { struct mount *parent = ACCESS_ONCE(mnt->mnt_parent); + /* Escaped? */ + if (dentry != vfsmnt->mnt_root) { + bptr = *buffer; + blen = *buflen; + error = 3; + break; + } /* Global root? */ if (mnt != parent) { dentry = ACCESS_ONCE(mnt->mnt_mountpoint);