summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaghavendra G <raghavendra@gluster.com>2009-11-18 15:07:22 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-11-19 02:57:45 -0800
commit717faf468fcac827d00c81c76ac53057c43e28fa (patch)
treef09012c07d086f73ef634e89ec01aeb8c7202079
parent68a9546e5ce01e6fefc8ae97d5d7e27da1f6d52a (diff)
transport/ib-verbs: assign to qpreg before accessing it in __ib_verbs_lookup_peer.
Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 381 (glusterfs crash in ib-verbs) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=381
-rw-r--r--transport/ib-verbs/src/ib-verbs.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/transport/ib-verbs/src/ib-verbs.c b/transport/ib-verbs/src/ib-verbs.c
index e0e25939b26..b43f942ec9e 100644
--- a/transport/ib-verbs/src/ib-verbs.c
+++ b/transport/ib-verbs/src/ib-verbs.c
@@ -698,6 +698,7 @@ __ib_verbs_lookup_peer (ib_verbs_device_t *device, int32_t qp_num)
ib_verbs_qpreg_t *qpreg = NULL;
int32_t hash = 0;
+ qpreg = &device->qpreg;
hash = qp_num % 42;
ent = qpreg->ents[hash].next;
while ((ent != &qpreg->ents[hash]) && (ent->qp_num != qp_num))