From c0b40b5bb1ff73131c743d74d3da16a28b2cbd28 Mon Sep 17 00:00:00 2001 From: "Kaleb S. KEITHLEY" Date: Mon, 8 Sep 2014 10:16:58 -0400 Subject: 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 Reviewed-on: http://review.gluster.org/8653 Tested-by: Gluster Build System Reviewed-by: Santosh Pradhan Reviewed-by: Niels de Vos --- xlators/nfs/server/src/acl3.c | 3 +++ 1 file changed, 3 insertions(+) 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; } -- cgit