Received: by 10.223.185.116 with SMTP id b49csp5962443wrg; Wed, 7 Mar 2018 22:44:56 -0800 (PST) X-Google-Smtp-Source: AG47ELvRaflizrdMafCXQix6rpfg5mzVZ253vqPA9xNrFG5Xdujq10KEV2Z06SUUw5RR52k266+4 X-Received: by 10.98.150.212 with SMTP id s81mr25707404pfk.100.1520491496740; Wed, 07 Mar 2018 22:44:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520491496; cv=none; d=google.com; s=arc-20160816; b=ejSH2PtuVLfmVjhjvdn/ZoCXHBb+IEgZjHEsFcYQrbpC989KpwyK+fBuhB2j1PBh8v +6URCuwJ3atfsRcEpRX5S+YY1gvWHxb2IsvXl1e8pcP+w95/acLooRZQxXKxeNERYqB4 mfifyJZ/GODpSm71oVQTXsY5lk59S7VjayUJcelIC5eUMm93vZKXRjwNizlQHgUeKr8v DCHmJbeH7+M8FKa9fenAAnZh01oCalQCO7dnzi87+TwOiWu8v5pPvOscvRg2aDjo2yH6 GbijPyTfUcxNq836VxhqrYR4DZBJ9BZ/AHg9DMtu94xGMEtff0m0ZOrdQmloqweL/O9T CLAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=zCCiarD63WZij3aLffessz64rHjdomuS89lr/iCmwAs=; b=uRc+lLyGk1KUd1iIlBiNO6H6850Yr+4QPy3H3oxZlI90zyTRzQbhSkofoZ5d4Aq2Uc Wg4jcN4pd5y0Y0a1rvXcYvtZCCOobOkLHWhArBdFVm6xpv+6lTbamazHQS75UtwEUq4q V6Y1NQQePoy5O918KChuOvfROZafFaxAzP0O90gI/R0EDt3B70qOotgogLxkBcn15s8E ily5DgQk+RZTzt4piNQ7OIEs69lGH0zMyT0pbCTDrkHfVvQN8Fn+j8jgADwVfVLzBL4l 6a4bZpsBnylExa7xIEMF6wHhN+CZhbyMP0K2KvOZSQ46xQw8/HJPuDYO+gPipOhdG11s 95Wg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=B/yqLo0G; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e93-v6si14115236plk.159.2018.03.07.22.44.42; Wed, 07 Mar 2018 22:44:56 -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=@microsoft.com header.s=selector1 header.b=B/yqLo0G; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935492AbeCHGni (ORCPT + 99 others); Thu, 8 Mar 2018 01:43:38 -0500 Received: from mail-by2nam03on0124.outbound.protection.outlook.com ([104.47.42.124]:6433 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S935351AbeCHE66 (ORCPT ); Wed, 7 Mar 2018 23:58:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=zCCiarD63WZij3aLffessz64rHjdomuS89lr/iCmwAs=; b=B/yqLo0GU2hEJOkQhaK5KmEGeCgWe4mzWHksYmzwSpWx8AgLA8COSpZAYVhJoQnIhy6XzeGbj3tJGoVMbayzCpsC2uceInjT3iQtkzuENUpCjBjpONEniSISYGtUHW1K4Tdfa+ctYgZb6vBuL79f/ocMZ4s/eUdJsBehoIsWz+8= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB1080.namprd21.prod.outlook.com (52.132.130.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.588.3; Thu, 8 Mar 2018 04:58:55 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8063:c68a:b210:7446]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8063:c68a:b210:7446%2]) with mapi id 15.20.0588.008; Thu, 8 Mar 2018 04:58:55 +0000 From: Sasha Levin To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" CC: Parav Pandit , Leon Romanovsky , Jason Gunthorpe , Sasha Levin Subject: [PATCH AUTOSEL for 4.14 37/67] RDMA/cma: Use correct size when writing netlink stats Thread-Topic: [PATCH AUTOSEL for 4.14 37/67] RDMA/cma: Use correct size when writing netlink stats Thread-Index: AQHTtpoA+nP+XPktsEOTc5ePuTyTVA== Date: Thu, 8 Mar 2018 04:57:47 +0000 Message-ID: <20180308045641.7814-37-alexander.levin@microsoft.com> References: <20180308045641.7814-1-alexander.levin@microsoft.com> In-Reply-To: <20180308045641.7814-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DM5PR2101MB1080;7:kyouoEFWfGN+9SFkemRX2iX+WNLYcg4XIVQm9zY/9GdIpxQPs5ntRZNTW8+vHn6Z2llYb6W7pteoerNtuJ1hnPj966BRahal+wpydDDixuDtBp2ULU5XF7YJCco6Mt8gfeHt+r4894dxbgTi0Pg2pTxqqGNAOxKVhA9AedPayZzvTyQbc8v+GmeqUhc60MdIHfW0ySnwnKCCCu6PfH6f/MzE3D2/F71U910fJwU6IJgNSZ7Ty1J6At9B54AEKgF2;20:YQuEoXH9HqpTdeXgNUJumV8iGnsQDI7+doIlMt67XBJkYr20nvp/Ijyprga2/i4QDYzgZJYzmjyJOmmgIwHYwZtn5zxAs2tH6sKwUo8OslBcikhEpeDj33tFL+88UkFLv7mtTBMe4rZg4SEicvyXAQH7q9RG5faZySxra+uV4Fc= x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 1fdc208a-a1b3-4287-4897-08d584b14bcc x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020);SRVR:DM5PR2101MB1080; x-ms-traffictypediagnostic: DM5PR2101MB1080: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(61425038)(6040501)(2401047)(8121501046)(5005006)(3231220)(944501244)(52105095)(93006095)(93001095)(10201501046)(3002001)(6055026)(61426038)(61427038)(6041288)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123562045)(20161123560045)(6072148)(201708071742011);SRVR:DM5PR2101MB1080;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB1080; x-forefront-prvs: 060503E79B x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(396003)(376002)(366004)(39380400002)(346002)(39860400002)(189003)(199004)(6116002)(1076002)(5250100002)(26005)(102836004)(2501003)(3846002)(59450400001)(186003)(6506007)(25786009)(3280700002)(4326008)(2906002)(68736007)(66066001)(86612001)(3660700001)(22452003)(6486002)(6436002)(14454004)(8676002)(81166006)(2900100001)(72206003)(81156014)(8936002)(478600001)(10090500001)(105586002)(10290500003)(53936002)(6512007)(6666003)(107886003)(2950100002)(106356001)(76176011)(316002)(7736002)(86362001)(36756003)(97736004)(54906003)(110136005)(5660300001)(99286004)(305945005)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB1080;H:DM5PR2101MB1032.namprd21.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: zShJITX/zajHeReIgOzsjalnwO74cCb6+JFpW5/7tcuI1ZA9tlNG+SD4Bl1bFqqeB7RrDtW/HwmP4pz+WXHZjNdSabdDLOOatVI+6nliOvfmbWd6nP+0lAignK/xCo7fdI/TEgzkBsRhifOvYQn2WeIfhL9/9qyQbzcWV2YZkvHWrPhWHOfHntP3mjlS0K42jT8tQcVpDWYDQwo9c7h9CiWM39xfxw7GhgQrLP2lFOohSjkyULNhj89wtWb4q2QM0VbqcWdN2bFL8QAaGIJTtjE8oFDqLShjvcx17D4V1aUWH3LCe63lniiRkmONet6vX/bNT0+jmsEScrJ6aEZ9jg== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1fdc208a-a1b3-4287-4897-08d584b14bcc X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Mar 2018 04:57:47.7331 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB1080 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Parav Pandit [ Upstream commit 7baaa49af3716fb31877c61f59b74d029ce15b75 ] The code was using the src size when formatting the dst. They are almost certainly the same value but it reads wrong. Fixes: ce117ffac2e9 ("RDMA/cma: Export AF_IB statistics") Signed-off-by: Parav Pandit Reviewed-by: Daniel Jurgens Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe Signed-off-by: Sasha Levin --- drivers/infiniband/core/cma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c index e457dface2d2..537512396eab 100644 --- a/drivers/infiniband/core/cma.c +++ b/drivers/infiniband/core/cma.c @@ -4436,7 +4436,7 @@ static int cma_get_id_stats(struct sk_buff *skb, stru= ct netlink_callback *cb) RDMA_NL_RDMA_CM_ATTR_SRC_ADDR)) goto out; if (ibnl_put_attr(skb, nlh, - rdma_addr_size(cma_src_addr(id_priv)), + rdma_addr_size(cma_dst_addr(id_priv)), cma_dst_addr(id_priv), RDMA_NL_RDMA_CM_ATTR_DST_ADDR)) goto out; --=20 2.14.1