[PATCH][EOAN/FOCAL/UNSTABLE] UBUNTU: SAUCE: overlayfs: fix shitfs special-casing
Christian Brauner
christian.brauner at ubuntu.com
Wed May 6 08:55:28 UTC 2020
BugLink: https://bugs.launchpad.net/bugs/1876645
When I picked up Andrei's patch I ported it wrong. We need to initialize
realpath before dereferencing it obviously.
Cc: Stefan Bader <stefan.bader at canonical.com>
Cc: Seth Forshee <seth.forshee at canonical.com>
Cc: Kamal Mostafa <kamal at canonical.com>
Cc: Kleber Sacilotto de Souza <kleber.souza at canonical.com>
Cc: Andrei Vagin <avagin at gmail.com>
Fixes: 4e1f6efeedae ("UBUNTU: SAUCE: overlayfs: use shiftfs hacks only with shiftfs as underlay")
Link: https://bugs.launchpad.net/bugs/1857257
Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>
---
fs/overlayfs/file.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/overlayfs/file.c b/fs/overlayfs/file.c
index 6bd7530efa5d..ccd5c2a0b044 100644
--- a/fs/overlayfs/file.c
+++ b/fs/overlayfs/file.c
@@ -43,6 +43,7 @@ static struct file *ovl_open_realfile(const struct file *file,
int flags = file->f_flags | O_NOATIME | FMODE_NONOTIFY;
old_cred = ovl_override_creds(inode->i_sb);
+ ovl_path_real(file->f_path.dentry, &realpath);
if (realpath.dentry->d_sb->s_magic == SHIFTFS_MAGIC)
realfile = open_with_fake_path(&realpath, flags, realinode,
current_cred());
base-commit: c1661f985431696160f6f931361bd3af096cc3bf
--
2.26.2
More information about the kernel-team
mailing list