Andreas Gruenbacher f92f290414 nfs: Fix potential posix_acl refcnt leak in nfs3_set_acl
commit 7648f939cb919b9d15c21fff8cd9eba908d595dc upstream.

nfs3_set_acl keeps track of the acl it allocated locally to determine if an acl
needs to be released at the end.  This results in a memory leak when the
function allocates an acl as well as a default acl.  Fix by releasing acls
that differ from the acl originally passed into nfs3_set_acl.

Fixes: b7fa0554cf1b ("[PATCH] NFS: Add support for NFSv3 ACLs")
Reported-by: Xiyu Yang <xiyuyang19@fudan.edu.cn>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-05-05 19:14:40 +02:00
..
2017-10-08 10:26:10 +02:00
2020-02-14 16:31:09 -05:00
2016-10-04 16:20:26 -04:00
2016-05-17 15:47:55 -04:00
2016-07-30 16:33:25 -07:00
2020-02-14 16:31:07 -05:00
2019-09-21 07:14:16 +02:00
2016-10-07 18:46:28 -07:00
2016-07-20 23:30:06 -04:00
2018-03-18 11:18:54 +01:00