Received: by 10.213.65.68 with SMTP id h4csp238636imn; Fri, 23 Mar 2018 03:38:43 -0700 (PDT) X-Google-Smtp-Source: AG47ELvL/APZiLUFF/WASRBV2zlp1JZL/9nRhmys5QCwwbvkKIcyJSJTIE7yBcOVEzT6Vyqm1Q+h X-Received: by 10.98.224.93 with SMTP id f90mr12214935pfh.21.1521801523887; Fri, 23 Mar 2018 03:38:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521801523; cv=none; d=google.com; s=arc-20160816; b=kudIJPfFsMpXpB+YEpVcOAWFE551iXCb6yITFxYk8n5+lNivVynp/pRpikq4IXB2ce TusVI8+ORI2PKS0FTb3GxgjjddTlZRX5fXGfEleE3YSLCEyPu2HTmW1gMfd3pspkuM+a saImUZBU1IxklLLrUvWCWiTWgtQrRiaLlOm46Fpbm1oAewnyO1vvrLylTHrdcg7BwLEf UTqiDcx9ttDMpKdg2m2LHedyTr3B9pTVQ0sCPV7g0t4PYYdkzjNoOpiuVhm9pR4cwH2q SavWASBAjYP4McqTcR5SR/uYC4e36EKH9J8DqK4wDqq9OepubEE3wwcGAW/1D8TEBnKU MM9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=nVNapHmOuAWxPt5wkKQ5hYuweRGlxrQRad0AeQ/dSsw=; b=b/CO/NCiEAs4Xr8dpjwDxs0HitDqW6Q/eySbPq4y/UZlyTNOsdwgzHVNBQxt/xKlwY lYyTek2Mwn9kTDnsijrtLkFjweF0+EO3PyDuBhZ0hjiAVrvv7HVUY9ozADiJ5jn3QLyi L4ChUwshjISudTXsXK2lKF1VMBmJbYOUmUvF7JzigSew3LsL0jtGZvKgCggh8orM1eZY OpNM1WV+GCp05QCPpq9qpBX6NAbFLCP0sLzrJJoXvREN/5n/vASOgp1V7OycDkcaMwHd u3ejrcnoXE/TvD/XJe9hueOvaW7jA1mr9WSLUPqLa532azNQMHCaSMdRMGLbiwF0Jl3H /2LQ== ARC-Authentication-Results: i=1; mx.google.com; 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 z14si1074396pgv.626.2018.03.23.03.38.29; Fri, 23 Mar 2018 03:38:43 -0700 (PDT) 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; 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 S1756091AbeCWKhi (ORCPT + 99 others); Fri, 23 Mar 2018 06:37:38 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:47160 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933788AbeCWKRX (ORCPT ); Fri, 23 Mar 2018 06:17:23 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 61C23E64; Fri, 23 Mar 2018 10:17:22 +0000 (UTC) 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 , Sasha Levin Subject: [PATCH 4.4 84/97] RDMA/cma: Use correct size when writing netlink stats Date: Fri, 23 Mar 2018 10:55:11 +0100 Message-Id: <20180323094202.218451631@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180323094157.535925724@linuxfoundation.org> References: <20180323094157.535925724@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ 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 Signed-off-by: Greg Kroah-Hartman --- drivers/infiniband/core/cma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/infiniband/core/cma.c +++ b/drivers/infiniband/core/cma.c @@ -4007,7 +4007,7 @@ static int cma_get_id_stats(struct sk_bu 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;