linux/fs/overlayfs
Amir Goldstein 939ae4efd5 ovl: fix false positive ESTALE on lookup
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...")
Cc: <stable@vger.kernel.org> # v4.13
Reported-by: Jordi Pujol <jordipujolp@gmail.com>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
2017-09-12 17:22:20 +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: constant d_ino for non-merge dirs 2017-07-27 21:54:06 +02:00
inode.c ovl: fix false positive ESTALE on lookup 2017-09-12 17:22:20 +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: constant d_ino for non-merge dirs 2017-07-27 21:54:06 +02:00
ovl_entry.h ovl: add flag for upper in ovl_entry 2017-07-04 22:03:18 +02:00
readdir.c ovl: constant d_ino for non-merge dirs 2017-07-27 21:54:06 +02:00
super.c ovl: fix relatime for directories 2017-09-05 12:53:11 +02:00
util.c ovl: constant d_ino for non-merge dirs 2017-07-27 21:54:06 +02:00