Skip to content

Commit

Permalink
rdma_cm: fail iwarp accepts w/o connection params
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Sean Hefty <[email protected]>
Signed-off-by: Steve Wise <[email protected]>
Cc: [email protected]
Signed-off-by: Doug Ledford <[email protected]>
  • Loading branch information
Steve Wise authored and dledford committed Feb 22, 2017
1 parent 9294000 commit f2625f7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/infiniband/core/cma.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f2625f7

Please sign in to comment.