path: root/drivers/infiniband/hw/qedr/qedr_iw_cm.c
diff options
authorLinus Torvalds <torvalds@linux-foundation.org>2019-01-05 18:20:51 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2019-01-05 18:20:51 -0800
commit3954e1d0310e30e743431b58918825c4d4fe8812 (patch)
tree2627da50ecad4c251ffdbba36e1300592560cf7f /drivers/infiniband/hw/qedr/qedr_iw_cm.c
parenta8a6b1186b1a209647483c2ff81e0d59c43dbdd3 (diff)
parent9c6260de505b63638dd86fcc33849b17f6146d94 (diff)
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma
Pull rdma fixes from Jason Gunthorpe: "Over the break a few defects were found, so this is a -rc style pull request of various small things that have been posted. - An attempt to shorten RCU grace period driven delays showed crashes during heavier testing, and has been entirely reverted - A missed merge/rebase error between the advise_mr and ib_device_ops series - Some small static analysis driven fixes from Julia and Aditya - Missed ability to create a XRC_INI in the devx verbs interop series" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: infiniband/qedr: Potential null ptr dereference of qp infiniband: bnxt_re: qplib: Check the return value of send_message IB/ipoib: drop useless LIST_HEAD IB/core: Add advise_mr to the list of known ops Revert "IB/mlx5: Fix long EEH recover time with NVMe offloads" IB/mlx5: Allow XRC INI usage via verbs in DEVX context
Diffstat (limited to 'drivers/infiniband/hw/qedr/qedr_iw_cm.c')
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/qedr/qedr_iw_cm.c b/drivers/infiniband/hw/qedr/qedr_iw_cm.c
index 505fa3648762..93b16237b767 100644
--- a/drivers/infiniband/hw/qedr/qedr_iw_cm.c
+++ b/drivers/infiniband/hw/qedr/qedr_iw_cm.c
@@ -492,6 +492,8 @@ int qedr_iw_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
int i;
qp = idr_find(&dev->qpidr.idr, conn_param->qpn);
+ if (unlikely(!qp))
+ return -EINVAL;
laddr = (struct sockaddr_in *)&cm_id->m_local_addr;
raddr = (struct sockaddr_in *)&cm_id->m_remote_addr;