Star64_linux/Documentation/filesystems
Amir Goldstein 0be0bfd2de ovl: fix regression caused by overlapping layers detection
Once upon a time, commit 2cac0c00a6 ("ovl: get exclusive ownership on
upper/work dirs") in v4.13 added some sanity checks on overlayfs layers.
This change caused a docker regression. The root cause was mount leaks
by docker, which as far as I know, still exist.

To mitigate the regression, commit 85fdee1eef ("ovl: fix regression
caused by exclusive upper/work dir protection") in v4.14 turned the
mount errors into warnings for the default index=off configuration.

Recently, commit 146d62e5a5 ("ovl: detect overlapping layers") in
v5.2, re-introduced exclusive upper/work dir checks regardless of
index=off configuration.

This changes the status quo and mount leak related bug reports have
started to re-surface. Restore the status quo to fix the regressions.
To clarify, index=off does NOT relax overlapping layers check for this
ovelayfs mount. index=off only relaxes exclusive upper/work dir checks
with another overlayfs mount.

To cover the part of overlapping layers detection that used the
exclusive upper/work dir checks to detect overlap with self upper/work
dir, add a trap also on the work base dir.

Link: https://github.com/moby/moby/issues/34672
Link: https://lore.kernel.org/linux-fsdevel/20171006121405.GA32700@veci.piliscsaba.szeredi.hu/
Link: https://github.com/containers/libpod/issues/3540
Fixes: 146d62e5a5 ("ovl: detect overlapping layers")
Cc: <stable@vger.kernel.org> # v4.19+
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Tested-by: Colin Walters <walters@verbum.org>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
2019-07-16 13:23:40 +02:00
..
caching Documentation: Use "while" instead of "whilst" 2018-11-20 09:30:43 -07:00
cifs cifs: minor documentation updates 2019-03-14 19:32:36 -05:00
configfs configfs: fix wrong name of struct in documentation 2018-12-20 08:41:38 -07:00
ext4
nfs Olga added support for the NFSv4.2 asynchronous copy protocol. We 2018-10-30 13:03:29 -07:00
9p.txt
adfs.txt
affs.txt
afs.txt
api-summary.rst docs: Bring some order to filesystem documentation 2019-03-06 09:46:10 -07:00
autofs-mount-control.txt autofs: update mount control expire desription with AUTOFS_EXP_FORCED 2019-05-14 19:52:50 -07:00
autofs.txt autofs: add description of ignore pseudo mount option 2019-05-14 19:52:50 -07:00
automount-support.txt
befs.txt
bfs.txt
binderfs.rst Documentation/filesystems: add binderfs 2019-01-14 17:21:37 -07:00
btrfs.txt
ceph.txt Documentation: modern versions of ceph are not backed by btrfs 2019-03-05 18:55:18 +01:00
coda.txt
conf.py
cramfs.txt
dax.txt doc: filesystems: fix bad references to nonexistent ext4.rst file 2019-01-03 09:28:45 -07:00
debugfs.txt debugfs: update documented return values of debugfs helpers 2019-04-25 11:56:50 +02:00
devpts.txt
directory-locking
dlmfs.txt
dnotify.txt
ecryptfs.txt
efivarfs.txt
ext2.txt doc: filesystems: fix bad references to nonexistent ext4.rst file 2019-01-03 09:28:45 -07:00
ext3.txt
f2fs.txt f2fs: fix to document inline_xattr_size option 2019-03-05 19:58:05 -08:00
fiemap.txt
files.txt
fscrypt.rst fscrypt: return -EXDEV for incompatible rename or link into encrypted dir 2019-01-23 23:56:43 -05:00
fuse-io.txt
fuse.txt
gfs2-glocks.txt
gfs2-uevents.txt
gfs2.txt
hfs.txt
hfsplus.txt
hpfs.txt
index.rst docs: Bring some order to filesystem documentation 2019-03-06 09:46:10 -07:00
inotify.txt
isofs.txt
jfs.txt
journalling.rst docs: Bring some order to filesystem documentation 2019-03-06 09:46:10 -07:00
Locking Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2019-05-07 20:50:27 -07:00
locks.txt
mandatory-locking.txt
mount_api.txt vfs: Update mount API docs 2019-03-28 08:54:20 -07:00
nilfs2.txt
ntfs.txt
ocfs2-online-filecheck.txt
ocfs2.txt
omfs.txt
orangefs.txt
overlayfs.txt ovl: fix regression caused by overlapping layers detection 2019-07-16 13:23:40 +02:00
path-lookup.rst docs: Bring some order to filesystem documentation 2019-03-06 09:46:10 -07:00
path-lookup.txt
porting Merge branch 'work.dcache' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2019-05-07 20:03:32 -07:00
proc.txt A fairly normal cycle for documentation stuff. We have a new 2018-12-29 11:21:49 -08:00
qnx6.txt Documentation: Use "while" instead of "whilst" 2018-11-20 09:30:43 -07:00
quota.txt
ramfs-rootfs-initramfs.txt
relay.txt
romfs.txt
seq_file.txt
sharedsubtree.txt
splice.rst docs: Bring some order to filesystem documentation 2019-03-06 09:46:10 -07:00
spufs.txt Documentation: fix spelling mistake, EACCESS -> EACCES 2018-11-07 15:28:55 -07:00
squashfs.txt
sysfs-pci.txt
sysfs-tagging.txt
sysfs.txt A fairly routine cycle for docs - lots of typo fixes, some new documents, 2019-03-09 09:56:17 -08:00
sysv-fs.txt
tmpfs.txt
ubifs-authentication.md
ubifs.txt
udf.txt
ufs.txt
vfat.txt
vfs.txt Documentation/filesystems/vfs.txt: document how ->i_link works 2019-04-30 23:59:25 -04:00
xfs-delayed-logging-design.txt
xfs-self-describing-metadata.txt Documentation: Use "while" instead of "whilst" 2018-11-20 09:30:43 -07:00
xfs.txt xfs: Introduce XFS_PTAG_VERIFIER_ERROR panic mask 2019-02-11 16:07:00 -08:00