Skip to content

Commit

Permalink
RDMA/core: Initialize port_num in qp_attr
Browse files Browse the repository at this point in the history
Initialize the port_num for iWARP in rdma_init_qp_attr.

Fixes: 5ecce4c("Check port number supplied by user verbs cmds")
Cc: <stable@vger.kernel.org> # v2.6.14+
Reviewed-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Mustafa Ismail <mustafa.ismail@intel.com>
Tested-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
  • Loading branch information
Ismail, Mustafa authored and Doug Ledford committed Jul 20, 2017
1 parent 5a7a88f commit a62ab66
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/infiniband/core/cma.c
Original file line number Diff line number Diff line change
Expand Up @@ -1033,6 +1033,8 @@ int rdma_init_qp_attr(struct rdma_cm_id *id, struct ib_qp_attr *qp_attr,
} else
ret = iw_cm_init_qp_attr(id_priv->cm_id.iw, qp_attr,
qp_attr_mask);
qp_attr->port_num = id_priv->id.port_num;
*qp_attr_mask |= IB_QP_PORT;
} else
ret = -ENOSYS;

Expand Down

0 comments on commit a62ab66

Please sign in to comment.