From c5f0fddc27ecc79aad1ce104d5dd088051639539 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. Upstream link : http://review.gluster.org/#/c/11276/ Change-Id: Id358dfcc797335bcd3b491c3129017b2caa826eb BUG: 1233041 Signed-off-by: anand Reviewed-on: http://review.gluster.org/11306 Reviewed-by: Atin Mukherjee Tested-by: Gluster Build System --- xlators/mgmt/glusterd/src/glusterd-utils.c | 28 ++++------------------------ 1 file changed, 4 insertions(+), 24 deletions(-) (limited to 'xlators/mgmt/glusterd/src/glusterd-utils.c') diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c index 9c9f80853de..988e316aa08 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.c +++ b/xlators/mgmt/glusterd/src/glusterd-utils.c @@ -241,11 +241,10 @@ glusterd_get_uuid (uuid_t *uuid) } int -glusterd_submit_request_unlocked (struct rpc_clnt *rpc, void *req, - call_frame_t *frame, rpc_clnt_prog_t *prog, - int procnum, struct iobref *iobref, - xlator_t *this, fop_cbk_fn_t cbkfn, - xdrproc_t xdrproc) +glusterd_submit_request (struct rpc_clnt *rpc, void *req, + call_frame_t *frame, rpc_clnt_prog_t *prog, + int procnum, struct iobref *iobref, + xlator_t *this, fop_cbk_fn_t cbkfn, xdrproc_t xdrproc) { char new_iobref = 0; int ret = -1; @@ -309,25 +308,6 @@ out: } -int -glusterd_submit_request (struct rpc_clnt *rpc, void *req, - call_frame_t *frame, rpc_clnt_prog_t *prog, - int procnum, struct iobref *iobref, - xlator_t *this, fop_cbk_fn_t cbkfn, xdrproc_t xdrproc) -{ - glusterd_conf_t *priv = THIS->private; - int ret = -1; - - synclock_unlock (&priv->big_lock); - { - ret = glusterd_submit_request_unlocked (rpc, req, frame, prog, - procnum, iobref, this, - cbkfn, xdrproc); - } - synclock_lock (&priv->big_lock); - - return ret; -} struct iobuf * -- cgit