summaryrefslogtreecommitdiffstats
path: root/xlators/features/quota/src/quotad-aggregator.c
diff options
context:
space:
mode:
authorvmallika <vmallika@redhat.com>2015-07-06 16:18:45 +0530
committerRaghavendra G <rgowdapp@redhat.com>2015-07-09 20:55:51 -0700
commit555301094fff111c92034ee5103a059a4be5872c (patch)
tree7bd7e9989a46be9f36c87e6d479a2f3439f25ec3 /xlators/features/quota/src/quotad-aggregator.c
parentbe76b0e0b1e58538077daaf444d4f82123823213 (diff)
quotad: create sock listener only after graph init is complete
This is a backport of http://review.gluster.org/#/c/11552/ If FOPs are received before completing graph initialization, FOP path can crash while accessing uninitialized variables This patch fixes issue by not creating listener until graph initialization is complete and hence not receiving FOP request > Change-Id: I4771e376410843dff44bfe819329a4632523d266 > BUG: 1240254 > Signed-off-by: vmallika <vmallika@redhat.com> Change-Id: I6c5964a8334abdc26aa2813c13f09e796e22b10a BUG: 1240906 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/11570 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Diffstat (limited to 'xlators/features/quota/src/quotad-aggregator.c')
-rw-r--r--xlators/features/quota/src/quotad-aggregator.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/xlators/features/quota/src/quotad-aggregator.c b/xlators/features/quota/src/quotad-aggregator.c
index 6c9c40a122f..8a7cfdca3f5 100644
--- a/xlators/features/quota/src/quotad-aggregator.c
+++ b/xlators/features/quota/src/quotad-aggregator.c
@@ -374,6 +374,11 @@ quotad_aggregator_init (xlator_t *this)
priv = this->private;
+ if (priv->rpcsvc) {
+ /* Listener already created */
+ return 0;
+ }
+
ret = dict_set_str (this->options, "transport.address-family", "unix");
if (ret)
goto out;
@@ -423,6 +428,11 @@ quotad_aggregator_init (xlator_t *this)
ret = 0;
out:
+ if (ret && priv->rpcsvc) {
+ GF_FREE (priv->rpcsvc);
+ priv->rpcsvc = NULL;
+ }
+
return ret;
}