Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2347586imm; Thu, 7 Jun 2018 09:08:40 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKCsbTFxvBeOKkKJSpdya5Qk+riqiPvR6ZRYfoDzO6jBn16RHfi2UECOnBNMovrEwLOpNTw X-Received: by 2002:a17:902:2bc5:: with SMTP id l63-v6mr2576748plb.299.1528387720574; Thu, 07 Jun 2018 09:08:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528387720; cv=none; d=google.com; s=arc-20160816; b=FxM7lx1Ncg2NvndrCg6flr2ydJHUqYv5E4OZskrVrl533zAcdgv8j/rwanRMrUPfl0 1mk2eE316t3tKCLnpIpux8fJZCrrUW8XIFYgD0NxT0AIQTuAPXdyEBo/32kZ8Y0eWgmE 6hf1Jw2nar6N8e37U0NObBYJq03Se4HBwT+pHHE073FXRFhcG8sK+oz6NWkEseIL4O3c NJ+XzAARgVnhn/5iZTB4gvYX1bVfYXBNYizYME/iG/yvUsS9dDMIW1JcWWBa8ZBC5jbk NDekCxNdcThCBrIKfU9PrxXuWHJZQbAlCHQk1YIS5tn5bcc2+eHZDbYEO0EYEs0lzhBe ASGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition :arc-authentication-results; bh=GwAoXESUmIfHMyE7VHwAc/o4kGwWNxQWRRBegELXyvI=; b=d5ckVZb5xTR4W+razbcGdHav6m/2CjEQM4ItYEnO6F2R0W6N9FTtbRg1MfSHDBeRte WHhEgBvz52wPkRpQEvY3MZfcRGqm6wIk/cJV9BjnCNXKZJgUV8pxLdNx33pL2UVu1XpF FTO2uQ4ERLvhYKq4DSPMUZiafvFZj9wNjWAJDso9fRlfPtLYfoT6vk+2akQdkvkPeVKn VXO4ZLYmhOFjclCFAJkbn2O0YLiWKUnPrZ6Bz3DBJgfVDPT5uKHZQv24xKJ+IKU+qEcV iq280n+jTB9hEPR1kRy+HFx9qQGU5XuHTXgN7O5eI6cwjBma9fAi9x1HPITcg4OSgqHi mlIQ== 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 s11-v6si4911092plp.464.2018.06.07.09.08.26; Thu, 07 Jun 2018 09:08:40 -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 S935982AbeFGQFP (ORCPT + 99 others); Thu, 7 Jun 2018 12:05:15 -0400 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:39240 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933008AbeFGOJE (ORCPT ); Thu, 7 Jun 2018 10:09:04 -0400 Received: from [148.252.241.226] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1fQvb4-0005Zj-8G; Thu, 07 Jun 2018 15:09:02 +0100 Received: from ben by deadeye with local (Exim 4.91) (envelope-from ) id 1fQvb0-0002oJ-TO; Thu, 07 Jun 2018 15:08:58 +0100 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "Leon Romanovsky" , "Parav Pandit" , "Daniel Jurgens" , "Jason Gunthorpe" Date: Thu, 07 Jun 2018 15:05:21 +0100 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.16 088/410] RDMA/cma: Use correct size when writing netlink stats In-Reply-To: X-SA-Exim-Connect-IP: 148.252.241.226 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.57-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Parav Pandit commit 7baaa49af3716fb31877c61f59b74d029ce15b75 upstream. 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: Ben Hutchings --- 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 @@ -3637,7 +3637,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;