author: Eric W. Biederman <ebiederm@xmission.com> 2015-08-15 13:36:12 -0500
committer: Al Viro <viro@zeniv.linux.org.uk> 2015-08-21 02:34:36 -0400
commit: cde93be45a8a90d8c264c776fab63487b5038a65
parent: 6f179af88f60b32c2855e7f3e16ea8e336a7043f
Commit Summary:
Diffstat:
1 file changed, 7 insertions, 0 deletions
diff --git a/fs/dcache.c b/fs/dcache.c
index 9b5fe503f6cb..e3b44ca75a1b 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -2926,6 +2926,13 @@ restart:
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);