summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-rpc-ops.c
diff options
context:
space:
mode:
authoranand <anekkunt@redhat.com>2015-06-17 16:11:48 +0530
committerAtin Mukherjee <amukherj@redhat.com>2015-06-19 02:49:44 -0700
commitc5f0fddc27ecc79aad1ce104d5dd088051639539 (patch)
treeb9f485bf8badfa9e466ff1434fd261b494884a7e /xlators/mgmt/glusterd/src/glusterd-rpc-ops.c
parentce1e498f532a3804878b1e2bbd363c53976fb1f4 (diff)
glusterd: Removing sync lock and unlock inside rcu read critical section
Issue : Glsuterd was crashing during peer probe. RCA : In glusterd, we are using big lock which is implemented based on sync task frame work for thread synchronization, sync task frame work swap the threads if there is no worker pool threads available. Due to this rcu lock and rcu unlock was happening in different threads (urcu-bp will not allow this), resulting into glusterd crash. fix : Removing sync lock and unlock inside rcu read critical section, which was left out by http://review.gluster.org/#/c/10285/ patch. Upstream link : http://review.gluster.org/#/c/11276/ Change-Id: Id358dfcc797335bcd3b491c3129017b2caa826eb BUG: 1233041 Signed-off-by: anand <anekkunt@redhat.com> Reviewed-on: http://review.gluster.org/11306 Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-rpc-ops.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-rpc-ops.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-rpc-ops.c b/xlators/mgmt/glusterd/src/glusterd-rpc-ops.c
index dcd257c1d1a..2b800e69c16 100644
--- a/xlators/mgmt/glusterd/src/glusterd-rpc-ops.c
+++ b/xlators/mgmt/glusterd/src/glusterd-rpc-ops.c
@@ -1556,13 +1556,12 @@ glusterd_rpc_friend_remove (call_frame_t *frame, xlator_t *this,
req.hostname = gf_strdup (peerinfo->hostname);
req.port = peerinfo->port;
- rcu_read_unlock ();
-
ret = glusterd_submit_request (peerinfo->rpc, &req, frame, peerinfo->peer,
GLUSTERD_FRIEND_REMOVE, NULL,
this, glusterd_friend_remove_cbk,
(xdrproc_t)xdr_gd1_mgmt_friend_req);
+ rcu_read_unlock ();
out:
GF_FREE (req.hostname);