summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2011-04-13 01:13:56 +0000
committerAnand Avati <avati@gluster.com>2011-04-14 01:00:45 -0700
commit55594008c2d719c7097998b3d8aa9771bcc9d3ff (patch)
tree4b0a1bd6338744d9d78361140a0d89ea77aae2e0
parent1875dd6c05a5964b46ce38f1bd3c0679ad5d17bf (diff)
mgmt/glusterd: check for 'peerinfo->mgmt' before accessing it
Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2728 ([glusterfs-3.2.0qa11]: glusterd crashed) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2728
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-op-sm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
index df8388fbb..56ea9a19d 100644
--- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c
+++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
@@ -5587,7 +5587,7 @@ glusterd_op_ac_send_lock (glusterd_op_sm_event_t *event, void *ctx)
list_for_each_entry (peerinfo, &priv->peers, uuid_list) {
GF_ASSERT (peerinfo);
- if (!peerinfo->connected)
+ if (!peerinfo->connected || !peerinfo->mgmt)
continue;
if ((peerinfo->state.state != GD_FRIEND_STATE_BEFRIENDED) &&
(glusterd_op_get_op() != GD_OP_SYNC_VOLUME))
@@ -5634,7 +5634,7 @@ glusterd_op_ac_send_unlock (glusterd_op_sm_event_t *event, void *ctx)
list_for_each_entry (peerinfo, &priv->peers, uuid_list) {
GF_ASSERT (peerinfo);
- if (!peerinfo->connected)
+ if (!peerinfo->connected || !peerinfo->mgmt)
continue;
if ((peerinfo->state.state != GD_FRIEND_STATE_BEFRIENDED) &&
(glusterd_op_get_op() != GD_OP_SYNC_VOLUME))
@@ -5849,7 +5849,7 @@ glusterd_op_ac_send_stage_op (glusterd_op_sm_event_t *event, void *ctx)
list_for_each_entry (peerinfo, &priv->peers, uuid_list) {
GF_ASSERT (peerinfo);
- if (!peerinfo->connected)
+ if (!peerinfo->connected || !peerinfo->mgmt)
continue;
if ((peerinfo->state.state != GD_FRIEND_STATE_BEFRIENDED) &&
(glusterd_op_get_op() != GD_OP_SYNC_VOLUME))
@@ -5975,7 +5975,7 @@ glusterd_op_ac_send_commit_op (glusterd_op_sm_event_t *event, void *ctx)
list_for_each_entry (peerinfo, &priv->peers, uuid_list) {
GF_ASSERT (peerinfo);
- if (!peerinfo->connected)
+ if (!peerinfo->connected || !peerinfo->mgmt)
continue;
if ((peerinfo->state.state != GD_FRIEND_STATE_BEFRIENDED) &&
(glusterd_op_get_op() != GD_OP_SYNC_VOLUME))