]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
nfs: fix acl memory leak of posix_acl_create()
authorGao Xiang <hsiangkao@linux.alibaba.com>
Fri, 18 Jun 2021 04:20:55 +0000 (12:20 +0800)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Mon, 20 Sep 2021 16:49:01 +0000 (18:49 +0200)
commitb26bcc9a9a80a09b3ddc1252f170e68f866a6465
tree3e231987119d6d8e1867d34feb463c394e15fc86
parenta66649563fa08db873be0970bc23c455f8edfd22
nfs: fix acl memory leak of posix_acl_create()

BugLink: https://bugs.launchpad.net/bugs/1939440
[ Upstream commit 1fcb6fcd74a222d9ead54d405842fc763bb86262 ]

When looking into another nfs xfstests report, I found acl and
default_acl in nfs3_proc_create() and nfs3_proc_mknod() error
paths are possibly leaked. Fix them in advance.

Fixes: 013cdf1088d7 ("nfs: use generic posix ACL infrastructure for v3 Posix ACLs")
Cc: Trond Myklebust <trond.myklebust@hammerspace.com>
Cc: Anna Schumaker <anna.schumaker@netapp.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Joseph Qi <joseph.qi@linux.alibaba.com>
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
fs/nfs/nfs3proc.c