projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
97df1c6
)
RDMA/cxgb4: Fix over-dereference when terminating
author
Steve Wise
<swise@opengridcomputing.com>
Wed, 9 Apr 2014 14:40:37 +0000
(09:40 -0500)
committer
Roland Dreier
<roland@purestorage.com>
Fri, 11 Apr 2014 18:36:10 +0000
(11:36 -0700)
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>
drivers/infiniband/hw/cxgb4/qp.c
patch
|
blob
|
history
diff --git
a/drivers/infiniband/hw/cxgb4/qp.c
b/drivers/infiniband/hw/cxgb4/qp.c
index 5a7d368aa47a1e41a27fe6c3384c1e3680e551de..7b5114cb486f64f118beb7f2415ad415d75f40ae 100644
(file)
--- 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);