diff options
author | Ismail, Mustafa <mustafa.ismail@intel.com> | 2017-07-14 17:41:31 +0300 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2017-07-20 18:24:13 +0300 |
commit | a62ab66b13a0f9bcb17b7b761f6670941ed5cd62 (patch) | |
tree | 0f14609ba1f3e3c95a7192d7f59aae349e728658 | |
parent | 5a7a88f1b488e4ee49eb3d5b82612d4d9ffdf2c3 (diff) | |
download | linux-a62ab66b13a0f9bcb17b7b761f6670941ed5cd62.tar.xz |
RDMA/core: Initialize port_num in qp_attr
Initialize the port_num for iWARP in rdma_init_qp_attr.
Fixes: 5ecce4c9b17b("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>
-rw-r--r-- | drivers/infiniband/core/cma.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c index 11aff923b633..0eb393237ba2 100644 --- a/drivers/infiniband/core/cma.c +++ b/drivers/infiniband/core/cma.c @@ -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; |