ovl: return EINVAL instead of EIO in case of mismatched user_ns
PATCH 1/1 ovl: return EINVAL instead of EIO in case of mismatched user_ns
The EIO was used to signal an internal error (commit 9efb069de4ba ("ovl:
add warning on user_ns mismatch")), which is no longer the case.
--- fs/overlayfs/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/overlayfs/super.c +1 -1
@@ -1543,7 +1543,7 @@ int ovl_fill_super(struct super_block *sb, struct fs_context *fc)struct ovl_fs *ofs = sb->s_fs_info;int err; - err = -EIO ; + err = -EINVAL ;/* The fscontext fd may have been passed to another user namespace. */ if (fc->user_ns !=current_user_ns ()) goto out_err;
Signature · 1 line
2.54.0
Quoted 15 lines · Miklos Szeredi
The EIO was used to signal an internal error (commit
9efb069de4ba("ovl:
add warning onuser_nsmismatch")), which is no longer the case.Fixes 63981fc786da ("ovl: don't warn when the mount is completed from another user namespace")Signed-off-by Miklos Szeredi <[email protected]>--- fs/overlayfs/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/overlayfs/super.c +0
-0
fs/overlayfs/super.c int ovl_fill_super(struct super_block *sb, struct fs_context *fc)
Quoted 9 lines
fs/overlayfs/super.c +1
-2@@ -1543,7 +1543,7 @@ int ovl_fill_super(struct super_block *sb, struct fs_context *fc)struct ovl_fs *ofs = sb->s_fs_info;int err; - err = -EIO ; + err = -EINVAL ;/* The fscontext fd may have been passed to another user namespace. */ if (fc->user_ns !=current_user_ns ()) goto out_err; --
Christian,
Will you pick this up?
If you do, please also take my other ovl fix patch from:
https://lore.kernel.org/linux-fsdevel/CAOQ4uxhX_neohTAjZDOT0oSWC-JNiqNWqnfE5YSa7Ln05QPQ-A@mail.gmail.com/
Thanks,
Amir.
Christian Brauner
AppliedQuoted 2 lines · Miklos Szeredi
The EIO was used to signal an internal error (commit
9efb069de4ba("ovl:
add warning onuser_nsmismatch")), which is no longer the case.
Applied to the vfs.fixes branch of the vfs/vfs.git tree. Patches in the vfs.fixes branch should appear in linux-next soon.
Please report any outstanding bugs that were missed during review in a new review to the original patch series allowing us to drop it.
It's encouraged to provide Acked-bys and Reviewed-bys even though the patch has now been applied. If possible patch trailers will be updated.
Note that commit hashes shown below are subject to change due to rebase, trailer updates or similar. If in doubt, please check the listed branch.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git branch: vfs.fixes
[1/1] ovl: return EINVAL instead of EIO in case of mismatched user_ns
https://git.kernel.org/vfs/vfs/c/a518e63c3775