Message ID | 20200108170126.19905-2-ioanna-maria.alifieraki@canonical.com |
---|---|
State | New |
Headers | show |
Series | Revert "ovl: modify ovl_permission() to do checks on two inodes" | expand |
On 08.01.20 18:01, Ioanna Alifieraki wrote: > BugLink: https://bugs.launchpad.net/bugs/1851243 > > This commit breaks r/w access to files. Since fixing it requires many > commits to be backported revert it to avoid risk of regressions. > For detailed description please look at LP #1851243. > > This reverts commit c8838e8eb196496e55cf40eed602a906b36ef1cc. > > Signed-off-by: Ioanna Alifieraki <ioanna-maria.alifieraki@canonical.com> Acked-by: Stefan Bader <stefan.bader@canonical.com> > --- Since this was found to introduce a regression this sounds appropriate to do. But since this was part of an upstream stable set I would suggest this also is brought up with gregkh (so he is at least aware). For now I would prefix the commit with "UBUNTU: SAUCE:" as it is specific to our tree (can be done when applying without need for re-submitting). Finally, for changes targeted for the main kernel, there is no need to ask for any of the derivatives/backports separately. As those are rebased, any updates automatically land there once applied to the main kernel. Only of something is needed in a derivative/backport only, this has to be requested. -Stefan > fs/overlayfs/inode.c | 13 ------------- > 1 file changed, 13 deletions(-) > > diff --git a/fs/overlayfs/inode.c b/fs/overlayfs/inode.c > index 060482e349ef..013d27dc6f58 100644 > --- a/fs/overlayfs/inode.c > +++ b/fs/overlayfs/inode.c > @@ -9,7 +9,6 @@ > > #include <linux/fs.h> > #include <linux/slab.h> > -#include <linux/cred.h> > #include <linux/xattr.h> > #include "overlayfs.h" > > @@ -92,7 +91,6 @@ int ovl_permission(struct inode *inode, int mask) > struct ovl_entry *oe; > struct dentry *alias = NULL; > struct inode *realinode; > - const struct cred *old_cred; > struct dentry *realdentry; > bool is_upper; > int err; > @@ -145,18 +143,7 @@ int ovl_permission(struct inode *inode, int mask) > goto out_dput; > } > > - /* > - * Check overlay inode with the creds of task and underlying inode > - * with creds of mounter > - */ > - err = generic_permission(inode, mask); > - if (err) > - goto out_dput; > - > - old_cred = ovl_override_creds(inode->i_sb); > err = __inode_permission(realinode, mask); > - revert_creds(old_cred); > - > out_dput: > dput(alias); > return err; >
On 1/8/20 9:01 AM, Ioanna Alifieraki wrote: > BugLink: https://bugs.launchpad.net/bugs/1851243 > > This commit breaks r/w access to files. Since fixing it requires many > commits to be backported revert it to avoid risk of regressions. > For detailed description please look at LP #1851243. > > This reverts commit c8838e8eb196496e55cf40eed602a906b36ef1cc. > > Signed-off-by: Ioanna Alifieraki <ioanna-maria.alifieraki@canonical.com> Acked-by: Connor Kuehl <connor.kuehl@canonical.com> > --- > fs/overlayfs/inode.c | 13 ------------- > 1 file changed, 13 deletions(-) > > diff --git a/fs/overlayfs/inode.c b/fs/overlayfs/inode.c > index 060482e349ef..013d27dc6f58 100644 > --- a/fs/overlayfs/inode.c > +++ b/fs/overlayfs/inode.c > @@ -9,7 +9,6 @@ > > #include <linux/fs.h> > #include <linux/slab.h> > -#include <linux/cred.h> > #include <linux/xattr.h> > #include "overlayfs.h" > > @@ -92,7 +91,6 @@ int ovl_permission(struct inode *inode, int mask) > struct ovl_entry *oe; > struct dentry *alias = NULL; > struct inode *realinode; > - const struct cred *old_cred; > struct dentry *realdentry; > bool is_upper; > int err; > @@ -145,18 +143,7 @@ int ovl_permission(struct inode *inode, int mask) > goto out_dput; > } > > - /* > - * Check overlay inode with the creds of task and underlying inode > - * with creds of mounter > - */ > - err = generic_permission(inode, mask); > - if (err) > - goto out_dput; > - > - old_cred = ovl_override_creds(inode->i_sb); > err = __inode_permission(realinode, mask); > - revert_creds(old_cred); > - > out_dput: > dput(alias); > return err; >
diff --git a/fs/overlayfs/inode.c b/fs/overlayfs/inode.c index 060482e349ef..013d27dc6f58 100644 --- a/fs/overlayfs/inode.c +++ b/fs/overlayfs/inode.c @@ -9,7 +9,6 @@ #include <linux/fs.h> #include <linux/slab.h> -#include <linux/cred.h> #include <linux/xattr.h> #include "overlayfs.h" @@ -92,7 +91,6 @@ int ovl_permission(struct inode *inode, int mask) struct ovl_entry *oe; struct dentry *alias = NULL; struct inode *realinode; - const struct cred *old_cred; struct dentry *realdentry; bool is_upper; int err; @@ -145,18 +143,7 @@ int ovl_permission(struct inode *inode, int mask) goto out_dput; } - /* - * Check overlay inode with the creds of task and underlying inode - * with creds of mounter - */ - err = generic_permission(inode, mask); - if (err) - goto out_dput; - - old_cred = ovl_override_creds(inode->i_sb); err = __inode_permission(realinode, mask); - revert_creds(old_cred); - out_dput: dput(alias); return err;
BugLink: https://bugs.launchpad.net/bugs/1851243 This commit breaks r/w access to files. Since fixing it requires many commits to be backported revert it to avoid risk of regressions. For detailed description please look at LP #1851243. This reverts commit c8838e8eb196496e55cf40eed602a906b36ef1cc. Signed-off-by: Ioanna Alifieraki <ioanna-maria.alifieraki@canonical.com> --- fs/overlayfs/inode.c | 13 ------------- 1 file changed, 13 deletions(-)