From 8ddf7f2669779cee460f1e008cdb62671cf15a40 Mon Sep 17 00:00:00 2001 From: anand Date: Wed, 17 Jun 2015 16:11:48 +0530 Subject: 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. Change-Id: Id358dfcc797335bcd3b491c3129017b2caa826eb BUG: 1232693 Signed-off-by: anand Reviewed-on: http://review.gluster.org/11276 Reviewed-by: Atin Mukherjee Reviewed-by: Krishnan Parthasarathi Tested-by: NetBSD Build System --- xlators/mgmt/glusterd/src/glusterd-rpc-ops.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'xlators/mgmt/glusterd/src/glusterd-rpc-ops.c') diff --git a/xlators/mgmt/glusterd/src/glusterd-rpc-ops.c b/xlators/mgmt/glusterd/src/glusterd-rpc-ops.c index f777d85f53e..2a0fba23496 100644 --- a/xlators/mgmt/glusterd/src/glusterd-rpc-ops.c +++ b/xlators/mgmt/glusterd/src/glusterd-rpc-ops.c @@ -1622,13 +1622,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); -- cgit