Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit af93fb5d authored by Steve Wise's avatar Steve Wise Committed by Roland Dreier
Browse files

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: default avatarSteve Wise <swise@opengridcomputing.com>
Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent c8e081a1
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1305,6 +1305,7 @@ int c4iw_modify_qp(struct c4iw_dev *rhp, struct c4iw_qp *qhp,

	/* disassociate the LLP connection */
	qhp->attr.llp_stream_handle = NULL;
	if (!ep)
		ep = qhp->ep;
	qhp->ep = NULL;
	qhp->attr.state = C4IW_QP_STATE_ERROR;