diff options
author | Steve Wise <swise@opengridcomputing.com> | 2014-04-09 09:40:37 -0500 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2014-04-11 11:36:10 -0700 |
commit | 1d1ca9b4fdde07325d263f7a75379527b1281f52 (patch) | |
tree | 06c17021c793df97431499caaf7ed1a296b04d97 /drivers | |
parent | 97df1c6736f660b58b408a60d0f7f65a64fb9d56 (diff) | |
download | linux-1d1ca9b4fdde07325d263f7a75379527b1281f52.tar.bz2 |
RDMA/cxgb4: Fix over-dereference when terminating
Need to get the endpoint reference before calling rdma_fini(), which
might fail causing us to not get the reference.
Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/infiniband/hw/cxgb4/qp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/cxgb4/qp.c b/drivers/infiniband/hw/cxgb4/qp.c index 5a7d368aa47a..7b5114cb486f 100644 --- a/drivers/infiniband/hw/cxgb4/qp.c +++ b/drivers/infiniband/hw/cxgb4/qp.c @@ -1389,6 +1389,7 @@ int c4iw_modify_qp(struct c4iw_dev *rhp, struct c4iw_qp *qhp, qhp->attr.ecode = attrs->ecode; ep = qhp->ep; disconnect = 1; + c4iw_get_ep(&qhp->ep->com); if (!internal) terminate = 1; else { @@ -1396,7 +1397,6 @@ int c4iw_modify_qp(struct c4iw_dev *rhp, struct c4iw_qp *qhp, if (ret) goto err; } - c4iw_get_ep(&qhp->ep->com); break; case C4IW_QP_STATE_ERROR: t4_set_wq_in_error(&qhp->wq); |