diff options
author | Steve Wise <swise@opengridcomputing.com> | 2010-09-10 20:14:48 +0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2010-09-28 21:46:29 +0400 |
commit | af93fb5dcc6b1cba5fd0861d349b3f9c93144bc0 (patch) | |
tree | 9fde36683bb652635ed8d8a45abd0178a2c11803 /drivers/infiniband/hw/cxgb4 | |
parent | c8e081a1bf11c5cbac5f2f9f53c040be61d7b29e (diff) | |
download | linux-af93fb5dcc6b1cba5fd0861d349b3f9c93144bc0.tar.xz |
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: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/cxgb4')
-rw-r--r-- | drivers/infiniband/hw/cxgb4/qp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/cxgb4/qp.c b/drivers/infiniband/hw/cxgb4/qp.c index 5d11f8601599..4f5dd66da39d 100644 --- a/drivers/infiniband/hw/cxgb4/qp.c +++ b/drivers/infiniband/hw/cxgb4/qp.c @@ -1305,7 +1305,8 @@ err: /* 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; |