From 91708968d01b253ee1ebcec1fdc3d602435144ef Mon Sep 17 00:00:00 2001 From: Kaushal M Date: Tue, 24 Mar 2015 12:56:09 +0530 Subject: glusterd: Prevent possible dealock in glusterd_friend_remove This change was developed on the git branch at [1]. This commit is a combination of the following commits on the development branch. b02290e Prevent possible dealock in glusterd_friend_remove [1]: https://github.com/kshlm/glusterfs/tree/urcu Change-Id: I1efeaf18f2054f4252ee95244908613542d209d9 BUG: 1205186 Signed-off-by: Kaushal M Reviewed-on: http://review.gluster.org/9979 Reviewed-by: Atin Mukherjee Reviewed-by: Gaurav Kumar Garg Tested-by: Gluster Build System Reviewed-by: Krishnan Parthasarathi Tested-by: Krishnan Parthasarathi --- xlators/mgmt/glusterd/src/glusterd-handler.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xlators/mgmt/glusterd/src/glusterd-handler.c b/xlators/mgmt/glusterd/src/glusterd-handler.c index a41b36b9715..399b0629708 100644 --- a/xlators/mgmt/glusterd/src/glusterd-handler.c +++ b/xlators/mgmt/glusterd/src/glusterd-handler.c @@ -3016,8 +3016,10 @@ glusterd_friend_remove (uuid_t uuid, char *hostname) rcu_read_lock (); peerinfo = glusterd_peerinfo_find (uuid, hostname); - if (peerinfo == NULL) + if (peerinfo == NULL) { + rcu_read_unlock (); goto out; + } ret = glusterd_friend_remove_cleanup_vols (peerinfo->uuid); if (ret) -- cgit