diff options
author | Niels de Vos <ndevos@redhat.com> | 2014-09-08 16:06:34 +0200 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2014-09-16 04:27:24 -0700 |
commit | ac6b4eafee170ed00b44c9df2b96da47733bf8bf (patch) | |
tree | cb1e2e0c6760d4df211881ecb061af582fc20515 | |
parent | dfaf76cffe37183c1b8072961b085f705c1c978f (diff) |
gNFS: Fix memory leak in setacl code path
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();
Cherry picked from commit 5c869aea79c0f304150eac014c7177e74ce0852e:
> Change-Id: I9caa3f851e49daaba15be3eec626f1f2dd8e45b3
> BUG: 1139195
> Signed-off-by: Santosh Kumar Pradhan <spradhan@redhat.com>
> Reviewed-on: http://review.gluster.org/8651
> Tested-by: Gluster Build System <jenkins@build.gluster.com>
> Reviewed-by: Niels de Vos <ndevos@redhat.com>
Change-Id: I9caa3f851e49daaba15be3eec626f1f2dd8e45b3
BUG: 1139244
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/8654
Reviewed-by: Santosh Pradhan <spradhan@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
-rw-r--r-- | xlators/nfs/server/src/acl3.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/xlators/nfs/server/src/acl3.c b/xlators/nfs/server/src/acl3.c index 42faffee854..5cd8b8e7061 100644 --- a/xlators/nfs/server/src/acl3.c +++ b/xlators/nfs/server/src/acl3.c @@ -471,6 +471,8 @@ acl3_setacl_cbk (call_frame_t *frame, void *cookie, acl3_setacl_reply (cs->req, &cs->args.setaclreply); + nfs3_call_state_wipe (cs); + return 0; } |