diff options
author | Amir Goldstein <amir73il@gmail.com> | 2019-11-14 22:28:41 +0200 |
---|---|---|
committer | Miklos Szeredi <mszeredi@redhat.com> | 2019-12-10 16:00:55 +0100 |
commit | 7e63c87fc2dcf3be9d3aab82d4a0ea085880bdca (patch) | |
tree | 9c2bf858ec3aae3e913d997f7e3105868b63adb9 /fs/mbcache.c | |
parent | 219d54332a09e8d8741c1e1982f5eae56099de85 (diff) | |
download | linux-7e63c87fc2dcf3be9d3aab82d4a0ea085880bdca.tar.gz linux-7e63c87fc2dcf3be9d3aab82d4a0ea085880bdca.tar.bz2 linux-7e63c87fc2dcf3be9d3aab82d4a0ea085880bdca.zip |
ovl: fix lookup failure on multi lower squashfs
In the past, overlayfs required that lower fs have non null uuid in
order to support nfs export and decode copy up origin file handles.
Commit 9df085f3c9a2 ("ovl: relax requirement for non null uuid of
lower fs") relaxed this requirement for nfs export support, as long
as uuid (even if null) is unique among all lower fs.
However, said commit unintentionally also relaxed the non null uuid
requirement for decoding copy up origin file handles, regardless of
the unique uuid requirement.
Amend this mistake by disabling decoding of copy up origin file handle
from lower fs with a conflicting uuid.
We still encode copy up origin file handles from those fs, because
file handles like those already exist in the wild and because they
might provide useful information in the future.
There is an unhandled corner case described by Miklos this way:
- two filesystems, A and B, both have null uuid
- upper layer is on A
- lower layer 1 is also on A
- lower layer 2 is on B
In this case bad_uuid won't be set for B, because the check only
involves the list of lower fs. Hence we'll try to decode a layer 2
origin on layer 1 and fail.
We will deal with this corner case later.
Reported-by: Colin Ian King <colin.king@canonical.com>
Tested-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/lkml/20191106234301.283006-1-colin.king@canonical.com/
Fixes: 9df085f3c9a2 ("ovl: relax requirement for non null uuid ...")
Cc: stable@vger.kernel.org # v4.20+
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/mbcache.c')
0 files changed, 0 insertions, 0 deletions