diff options
author | Steve Wise <swise@opengridcomputing.com> | 2017-02-21 22:21:57 +0300 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2017-02-22 23:35:03 +0300 |
commit | f2625f7db4dd0bbd16a9c7d2950e7621f9aa57ad (patch) | |
tree | c66f8f03b9ee695ea4775407e9741a40b254a508 /drivers/infiniband | |
parent | 9294000d6d895ad609f3cc4aff98c9c6175b466f (diff) | |
download | linux-f2625f7db4dd0bbd16a9c7d2950e7621f9aa57ad.tar.xz |
rdma_cm: fail iwarp accepts w/o connection params
cma_accept_iw() needs to return an error if conn_params is NULL.
Since this is coming from user space, we can crash.
Reported-by: Shaobo He <shaobo@cs.utah.edu>
Acked-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Cc: stable@vger.kernel.org
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/core/cma.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c index dab2a96ea032..5ed6ec9d6a93 100644 --- a/drivers/infiniband/core/cma.c +++ b/drivers/infiniband/core/cma.c @@ -3683,6 +3683,9 @@ static int cma_accept_iw(struct rdma_id_private *id_priv, struct iw_cm_conn_param iw_param; int ret; + if (!conn_param) + return -EINVAL; + ret = cma_modify_qp_rtr(id_priv, conn_param); if (ret) return ret; |