diff options
author | Kaleb S. KEITHLEY <kkeithle@redhat.com> | 2014-09-08 10:16:58 -0400 |
---|---|---|
committer | Kaleb KEITHLEY <kkeithle@redhat.com> | 2014-09-09 04:16:05 -0700 |
commit | c0b40b5bb1ff73131c743d74d3da16a28b2cbd28 (patch) | |
tree | 611ecf1911731166157d97615b3c58e5123fe279 /xlators | |
parent | 1d4ef0b891899e3a6dbc8c2087e73cee6f5a7fbe (diff) |
gNFS: Fix memory leak in setacl code path
Backport of http://review.gluster.org/#/c/8651 (BZ # 1139195) to
release-3.4
If ACL is set on a file in Gluster NFS mount (setfacl command),
and it succeed, then the NFS call state data is leaked. Though
all the failure code path frees up the memory.
Impact: There is a OOM kill i.e. vdsm invoked oom-killer during
rebalance and Killed process 4305, UID 0, (glusterfs nfs process)
FIX:
Make sure to deallocate the memory for call state in acl3_setacl_cbk()
using nfs3_call_state_wipe();
Change-Id: I6664a9151e9417e114c858bb2cdb136d9cb0b283
BUG: 1139250
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/8653
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Santosh Pradhan <spradhan@redhat.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r-- | xlators/nfs/server/src/acl3.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/xlators/nfs/server/src/acl3.c b/xlators/nfs/server/src/acl3.c index ed60775ab32..b26a2978438 100644 --- a/xlators/nfs/server/src/acl3.c +++ b/xlators/nfs/server/src/acl3.c @@ -414,6 +414,9 @@ acl3_setacl_cbk (call_frame_t *frame, void *cookie, acl3svc_submit_reply (cs->req, (void *)&cs->args.setaclreply, (acl3_serializer)xdr_serialize_setaclreply); + + nfs3_call_state_wipe (cs); + return 0; } |