Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2529202imu; Thu, 29 Nov 2018 06:27:43 -0800 (PST) X-Google-Smtp-Source: AFSGD/WgQF50JRbqABhlqQAfxPXzaErDFkjOo55+P5WJwMON6ZKvZamIpoxHgZ8TXdNQzEoIImJu X-Received: by 2002:a17:902:784d:: with SMTP id e13mr1714536pln.188.1543501663832; Thu, 29 Nov 2018 06:27:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543501663; cv=none; d=google.com; s=arc-20160816; b=fIvxnGqpaUniFY/7TJtuypqsUP/qfDxqRi4GFpMC/VWER6ZXoEk83FMtqtPeo5GUCT YPRCHfbAK5XDBTY+3ssN5kESCWza7qGBlL42P+TMDkOq4SwbS5lx+h7yJXYvxaewLNME yqwJnNiExLiTefguf46Vh0dMJe8Narz4wzeOSBQX78K38jKXCgj+08/kyVKWplqtp3lS 8/FrXSZI9M4AM3oXtoKrkepHKJ1HAw5CZDgHGGW84bLGXuOMdBN8JTgmeU5qK1cKVC1g TspnBoa3wGKCGgk8gpay9vj9Op+JxazADVwrMPemhB+0k38IaImM6Fn9sk6eDq5FCKqh 0VYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=i/SVG3JXCAF6AaR06Iwrla4IZveD29VhOfs1IPK6lzE=; b=joExjnGXz2SPRF9pwV+fGlpgpQ/9GMHRaVJKwtat8PActkFxrm/5YD0ZXu6Hbw8w2l gTqi7HWMWJNM3Q9ZAS9T5cqcG90XuIv77TBkllnIewSkSYEBClHe6V9wT3t4RcJMPFZP yfSgCPUijUfipaxpLXoUUDZPO7Jh9m1IsEXhFmwgJ4iexHMGJiF9dMZnOwclY4GolmEf UDiygsqVaD3cgjKyar8KobXrEUjbaurPxiw0OeAhM54fFnVNB0NBZumrE5IMrX5ZBe45 piEnxMLvQq9Qut+uB+BQ5sajNdwXOTY/v4KDz9rn6fsq7Ij5waV1BwQvAUkF4Rxdbwl2 aq1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=DxxuDS1f; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n33si1769293pgl.336.2018.11.29.06.27.28; Thu, 29 Nov 2018 06:27:43 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=DxxuDS1f; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732961AbeK3Bax (ORCPT + 99 others); Thu, 29 Nov 2018 20:30:53 -0500 Received: from mail.kernel.org ([198.145.29.99]:58166 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732932AbeK3Bax (ORCPT ); Thu, 29 Nov 2018 20:30:53 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 65BD72145D; Thu, 29 Nov 2018 14:25:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1543501520; bh=ed96p4ykzJ/5OD8f/bb9ENZym7zHLdJ+02iJFjEXi4s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DxxuDS1fzgNiytgXKofPnxVdMeO7ID2NP95C5uwuEvbjpmXPFkzbbx6HThFTNU2TT 0s+Y4gGSKOnrDgPtOs1WgsqfIJv1q4e9nAiCh459zdnfRFBsFyz2hDc4ilI49IAA47 X5Ky7Q0vZigDb9WFe4nKvbwpk49d9dVB6lkR7yAw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Parav Pandit , Daniel Jurgens , Leon Romanovsky , Jason Gunthorpe Subject: [PATCH 4.14 031/100] IB/core: Perform modify QP on real one Date: Thu, 29 Nov 2018 15:12:01 +0100 Message-Id: <20181129140101.479596721@linuxfoundation.org> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181129140058.768942700@linuxfoundation.org> References: <20181129140058.768942700@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Parav Pandit commit b2bedfb39541a7e14798d066b6f8685d84c8fcf5 upstream. Currently qp->port stores the port number whenever IB_QP_PORT QP attribute mask is set (during QP state transition to INIT state). This port number should be stored for the real QP when XRC target QP is used. Follow the ib_modify_qp() implementation and hide the access to ->real_qp. Fixes: a512c2fbef9c ("IB/core: Introduce modify QP operation with udata") Signed-off-by: Parav Pandit Reviewed-by: Daniel Jurgens Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe Signed-off-by: Greg Kroah-Hartman --- drivers/infiniband/core/verbs.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) --- a/drivers/infiniband/core/verbs.c +++ b/drivers/infiniband/core/verbs.c @@ -1285,7 +1285,7 @@ EXPORT_SYMBOL(ib_resolve_eth_dmac); /** * ib_modify_qp_with_udata - Modifies the attributes for the specified QP. - * @qp: The QP to modify. + * @ib_qp: The QP to modify. * @attr: On input, specifies the QP attributes to modify. On output, * the current values of selected QP attributes are returned. * @attr_mask: A bit-mask used to specify which attributes of the QP @@ -1294,9 +1294,10 @@ EXPORT_SYMBOL(ib_resolve_eth_dmac); * are being modified. * It returns 0 on success and returns appropriate error code on error. */ -int ib_modify_qp_with_udata(struct ib_qp *qp, struct ib_qp_attr *attr, +int ib_modify_qp_with_udata(struct ib_qp *ib_qp, struct ib_qp_attr *attr, int attr_mask, struct ib_udata *udata) { + struct ib_qp *qp = ib_qp->real_qp; int ret; if (attr_mask & IB_QP_AV) {