Commit f90e6f9a authored by Steve Wise's avatar Steve Wise Committed by Sasha Levin

rdma_cm: fail iwarp accepts w/o connection params

[ Upstream commit f2625f7d ]

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: default avatarShaobo He <shaobo@cs.utah.edu>
Acked-by: default avatarSean Hefty <sean.hefty@intel.com>
Signed-off-by: default avatarSteve Wise <swise@opengridcomputing.com>
Cc: stable@vger.kernel.org
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
Signed-off-by: default avatarSasha Levin <alexander.levin@verizon.com>
parent a60c9ff3
...@@ -2962,6 +2962,9 @@ static int cma_accept_iw(struct rdma_id_private *id_priv, ...@@ -2962,6 +2962,9 @@ static int cma_accept_iw(struct rdma_id_private *id_priv,
struct iw_cm_conn_param iw_param; struct iw_cm_conn_param iw_param;
int ret; int ret;
if (!conn_param)
return -EINVAL;
ret = cma_modify_qp_rtr(id_priv, conn_param); ret = cma_modify_qp_rtr(id_priv, conn_param);
if (ret) if (ret)
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment