diff options
author | Greg Kroah-Hartman <gregkh@google.com> | 2020-05-05 19:29:21 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2020-05-05 19:29:21 +0200 |
commit | b7e5163e48fbcc262d65782d3fabd1cc08a2d757 (patch) | |
tree | 74be41e9042e434b9e4a36620d93b29ac4313a16 /fs | |
parent | 82cb57eb0b7280471835e36813b94cd4f2a37372 (diff) | |
parent | b63f449e18b130fdc372b9717e72c19b83fc4876 (diff) |
Merge 4.4.222 into android-4.4-p
Changes in 4.4.222
ext4: fix special inode number checks in __ext4_iget()
drm/qxl: qxl_release leak in qxl_hw_surface_alloc()
ALSA: pcm: oss: Place the plugin buffer overflow checks correctly
PM: ACPI: Output correct message on target power state
RDMA/mlx4: Initialize ib_spec on the stack
vfio/type1: Fix VA->PA translation for PFNMAP VMAs in vaddr_get_pfn()
ALSA: opti9xx: shut up gcc-10 range warning
nfs: Fix potential posix_acl refcnt leak in nfs3_set_acl
dmaengine: dmatest: Fix iteration non-stop logic
i2c: designware-pci: use IRQF_COND_SUSPEND flag
perf hists: Fix HISTC_MEM_DCACHELINE width setting
powerpc/perf: Remove PPMU_HAS_SSLOT flag for Power8
perf/x86: Fix uninitialized value usage
exynos4-is: fix a format string bug
ASoC: wm8960: Fix WM8960_SYSCLK_PLL mode
ASoC: imx-spdif: Fix crash on suspend
ipv6: use READ_ONCE() for inet->hdrincl as in ipv4
selinux: properly handle multiple messages in selinux_netlink_send()
Linux 4.4.222
Change-Id: I510144039d424ae2e57ae23c188f2ed4d020ed11
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ext4/inode.c | 2 | ||||
-rw-r--r-- | fs/nfs/nfs3acl.c | 22 |
2 files changed, 16 insertions, 8 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index e5708f6c985b..351d41f26d72 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -4290,7 +4290,7 @@ struct inode *__ext4_iget(struct super_block *sb, unsigned long ino, uid_t i_uid; gid_t i_gid; - if (((flags & EXT4_IGET_NORMAL) && + if ((!(flags & EXT4_IGET_SPECIAL) && (ino < EXT4_FIRST_INO(sb) && ino != EXT4_ROOT_INO)) || (ino < EXT4_ROOT_INO) || (ino > le32_to_cpu(EXT4_SB(sb)->s_es->s_inodes_count))) { diff --git a/fs/nfs/nfs3acl.c b/fs/nfs/nfs3acl.c index 1ebe2fc7cda2..05c697d5b477 100644 --- a/fs/nfs/nfs3acl.c +++ b/fs/nfs/nfs3acl.c @@ -213,37 +213,45 @@ int nfs3_proc_setacls(struct inode *inode, struct posix_acl *acl, int nfs3_set_acl(struct inode *inode, struct posix_acl *acl, int type) { - struct posix_acl *alloc = NULL, *dfacl = NULL; + struct posix_acl *orig = acl, *dfacl = NULL, *alloc; int status; if (S_ISDIR(inode->i_mode)) { switch(type) { case ACL_TYPE_ACCESS: - alloc = dfacl = get_acl(inode, ACL_TYPE_DEFAULT); + alloc = get_acl(inode, ACL_TYPE_DEFAULT); if (IS_ERR(alloc)) goto fail; + dfacl = alloc; break; case ACL_TYPE_DEFAULT: - dfacl = acl; - alloc = acl = get_acl(inode, ACL_TYPE_ACCESS); + alloc = get_acl(inode, ACL_TYPE_ACCESS); if (IS_ERR(alloc)) goto fail; + dfacl = acl; + acl = alloc; break; } } if (acl == NULL) { - alloc = acl = posix_acl_from_mode(inode->i_mode, GFP_KERNEL); + alloc = posix_acl_from_mode(inode->i_mode, GFP_KERNEL); if (IS_ERR(alloc)) goto fail; + acl = alloc; } status = __nfs3_proc_setacls(inode, acl, dfacl); - posix_acl_release(alloc); +out: + if (acl != orig) + posix_acl_release(acl); + if (dfacl != orig) + posix_acl_release(dfacl); return status; fail: - return PTR_ERR(alloc); + status = PTR_ERR(alloc); + goto out; } const struct xattr_handler *nfs3_xattr_handlers[] = { |