提交 af93fb5d 编写于 作者: S Steve Wise 提交者: Roland Dreier

RDMA/cxgb4: Don't use null ep ptr

In c4iw_modify_qp() error path, only use qhp->ep if ep is not already set.
Otherwise qhp->ep can be NULL and we crash.
Signed-off-by: NSteve Wise <swise@opengridcomputing.com>
Signed-off-by: NRoland Dreier <rolandd@cisco.com>
上级 c8e081a1
......@@ -1305,7 +1305,8 @@ int c4iw_modify_qp(struct c4iw_dev *rhp, struct c4iw_qp *qhp,
/* disassociate the LLP connection */
qhp->attr.llp_stream_handle = NULL;
ep = qhp->ep;
if (!ep)
ep = qhp->ep;
qhp->ep = NULL;
qhp->attr.state = C4IW_QP_STATE_ERROR;
free = 1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册