ovl: disallow overlayfs as upperdir
authorMiklos Szeredi <mszeredi@redhat.com>
Fri, 29 Jul 2016 10:05:24 +0000 (12:05 +0200)
committerMiklos Szeredi <mszeredi@redhat.com>
Fri, 29 Jul 2016 10:05:24 +0000 (12:05 +0200)
This does not work and does not make sense.  So instead of fixing it
(probably not hard) just disallow.

Reported-by: Andrei Vagin <avagin@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Cc: <stable@vger.kernel.org>
fs/overlayfs/super.c

index 7fd216a89d9ab2dc525733112b5bf7749bb03e11..f3577395eca501262de3a46057e3c5b76c1d5ff9 100644 (file)
@@ -407,7 +407,8 @@ static struct ovl_entry *ovl_alloc_entry(unsigned int numlower)
 static bool ovl_dentry_remote(struct dentry *dentry)
 {
        return dentry->d_flags &
-               (DCACHE_OP_REVALIDATE | DCACHE_OP_WEAK_REVALIDATE);
+               (DCACHE_OP_REVALIDATE | DCACHE_OP_WEAK_REVALIDATE |
+                DCACHE_OP_REAL);
 }
 
 static bool ovl_dentry_weird(struct dentry *dentry)