Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754541AbdGNOl5 (ORCPT ); Fri, 14 Jul 2017 10:41:57 -0400 Received: from mga04.intel.com ([192.55.52.120]:63971 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754498AbdGNOlu (ORCPT ); Fri, 14 Jul 2017 10:41:50 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,359,1496127600"; d="scan'208";a="125155138" From: Mustafa Ismail To: linux-rdma@vger.kernel.org, dledford@redhat.com Cc: swise@opengridcomputing.com, linux-kernel@vger.kernel.org, stable@vger.kernel.org, e1000-rdma@lists.sourceforge.net, shiraz.saleem@intel.com Subject: [PATCH v2 2/2] RDMA/core: Initialize port_num in qp_attr Date: Fri, 14 Jul 2017 09:41:31 -0500 Message-Id: <1500043291-19768-3-git-send-email-mustafa.ismail@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1500043291-19768-1-git-send-email-mustafa.ismail@intel.com> References: <1500043291-19768-1-git-send-email-mustafa.ismail@intel.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 831 Lines: 25 Initialize the port_num for iWARP in rdma_init_qp_attr. Fixes: 5ecce4c9b17b("Check port number supplied by user verbs cmds") Cc: # v2.6.14+ Reviewed-by: Steve Wise Signed-off-by: Mustafa Ismail --- drivers/infiniband/core/cma.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c index 31bb82d..d65a093 100644 --- a/drivers/infiniband/core/cma.c +++ b/drivers/infiniband/core/cma.c @@ -1044,6 +1044,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; -- 2.7.4