diff options
author | Raghavendra G <raghavendra@gluster.com> | 2009-08-31 22:35:28 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2009-09-02 10:30:15 -0700 |
commit | cf1005c9f650069a22d443dec32f33129431990a (patch) | |
tree | e7ffd0bd72952933bb5adba5933a303a2ae4e0ee /transport | |
parent | addf1c713a017a7b1b4a871243f599267255e815 (diff) |
ib-verbs: handle failure of ibv_create_qp gracefully.
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 217 (crash in ib_verbs_create_qp)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=217
Diffstat (limited to 'transport')
-rw-r--r-- | transport/ib-verbs/src/ib-verbs.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/transport/ib-verbs/src/ib-verbs.c b/transport/ib-verbs/src/ib-verbs.c index 0df10439f..b1ce52184 100644 --- a/transport/ib-verbs/src/ib-verbs.c +++ b/transport/ib-verbs/src/ib-verbs.c @@ -761,6 +761,7 @@ ib_verbs_create_qp (transport_t *this) "%s: could not create QP", this->xl->name); ret = -1; + goto out; } else if (ibv_modify_qp (peer->qp, &attr, IBV_QP_STATE | IBV_QP_PKEY_INDEX | @@ -771,6 +772,7 @@ ib_verbs_create_qp (transport_t *this) "%s: failed to modify QP to INIT state", this->xl->name); ret = -1; + goto out; } peer->local_lid = ib_verbs_get_local_lid (device->context, @@ -780,6 +782,7 @@ ib_verbs_create_qp (transport_t *this) ib_verbs_register_peer (device, peer->qp->qp_num, peer); +out: if (ret == -1) __ib_verbs_destroy_qp (this); |