From 717faf468fcac827d00c81c76ac53057c43e28fa Mon Sep 17 00:00:00 2001 From: Raghavendra G Date: Wed, 18 Nov 2009 15:07:22 +0000 Subject: transport/ib-verbs: assign to qpreg before accessing it in __ib_verbs_lookup_peer. Signed-off-by: Raghavendra G Signed-off-by: Anand V. Avati BUG: 381 (glusterfs crash in ib-verbs) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=381 --- transport/ib-verbs/src/ib-verbs.c | 1 + 1 file changed, 1 insertion(+) (limited to 'transport') 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)) -- cgit