From: Linus Torvalds Date: Sat, 15 Oct 2016 00:23:33 +0000 (-0700) Subject: Merge branch 'overlayfs-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszer... X-Git-Tag: MMI-PSA29.97-13-9~6944 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1a892b485f328224b4882818f84fcc0a3208677d;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git Merge branch 'overlayfs-linus' of git://git./linux/kernel/git/mszeredi/vfs Pull overlayfs updates from Miklos Szeredi: "This update contains fixes to the "use mounter's permission to access underlying layers" area, and miscellaneous other fixes and cleanups. No new features this time" * 'overlayfs-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs: ovl: use vfs_get_link() vfs: add vfs_get_link() helper ovl: use generic_readlink ovl: explain error values when removing acl from workdir ovl: Fix info leak in ovl_lookup_temp() ovl: during copy up, switch to mounter's creds early ovl: lookup: do getxattr with mounter's permission ovl: copy_up_xattr(): use strnlen --- 1a892b485f328224b4882818f84fcc0a3208677d diff --cc fs/overlayfs/copy_up.c index 3f803b3a1f82,e9d4013ed3c6..aeb60f791418 --- a/fs/overlayfs/copy_up.c +++ b/fs/overlayfs/copy_up.c @@@ -57,9 -57,10 +57,10 @@@ int ovl_copy_xattr(struct dentry *old, ssize_t list_size, size, value_size = 0; char *buf, *name, *value = NULL; int uninitialized_var(error); + size_t slen; - if (!old->d_inode->i_op->getxattr || - !new->d_inode->i_op->getxattr) + if (!(old->d_inode->i_opflags & IOP_XATTR) || + !(new->d_inode->i_opflags & IOP_XATTR)) return 0; list_size = vfs_listxattr(old, NULL, 0); diff --cc fs/overlayfs/inode.c index c18d6a4ff456,bc6d261db669..c58f01babf30 --- a/fs/overlayfs/inode.c +++ b/fs/overlayfs/inode.c @@@ -375,9 -354,12 +351,9 @@@ static const struct inode_operations ov static const struct inode_operations ovl_symlink_inode_operations = { .setattr = ovl_setattr, .get_link = ovl_get_link, - .readlink = ovl_readlink, + .readlink = generic_readlink, .getattr = ovl_getattr, - .setxattr = generic_setxattr, - .getxattr = generic_getxattr, .listxattr = ovl_listxattr, - .removexattr = generic_removexattr, .update_time = ovl_update_time, };