linux/fs/overlayfs
Amir Goldstein 9a023afa8c ovl: fix false positive ESTALE on lookup
commit 939ae4efd5 upstream.

Commit b9ac5c274b ("ovl: hash overlay non-dir inodes by copy up origin")
verifies that the origin lower inode stored in the overlayfs inode matched
the inode of a copy up origin dentry found by lookup.

There is a false positive result in that check when lower fs does not
support file handles and copy up origin cannot be followed by file handle
at lookup time.

The false negative happens when finding an overlay inode in cache on a
copied up overlay dentry lookup. The overlay inode still 'remembers' the
copy up origin inode, but the copy up origin dentry is not available for
verification.

Relax the check in case copy up origin dentry is not available.

Fixes: b9ac5c274b ("ovl: hash overlay non-dir inodes by copy up...")
Reported-by: Jordi Pujol <jordipujolp@gmail.com>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2017-09-20 08:27:48 +02:00
..
copy_up.c ovl: mark parent impure and restore timestamp on ovl_link_up() 2017-07-04 22:08:15 +02:00
dir.c ovl: mark parent impure on ovl_link() 2017-07-13 22:06:45 +02:00
inode.c ovl: fix false positive ESTALE on lookup 2017-09-20 08:27:48 +02:00
Kconfig ovl: introduce the inodes index dir feature 2017-07-04 22:03:17 +02:00
Makefile ovl: split super.c 2016-12-16 11:02:56 +01:00
namei.c ovl: check for bad and whiteout index on lookup 2017-07-20 11:08:21 +02:00
overlayfs.h ovl: fix xattr get and set with selinux 2017-07-20 11:08:21 +02:00
ovl_entry.h ovl: add flag for upper in ovl_entry 2017-07-04 22:03:18 +02:00
readdir.c ovl: do not cleanup directory and whiteout index entries 2017-07-20 11:08:21 +02:00
super.c ovl: fix xattr get and set with selinux 2017-07-20 11:08:21 +02:00
util.c ovl: fix xattr get and set with selinux 2017-07-20 11:08:21 +02:00