4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Parav Pandit <pa...@mellanox.com>


[ 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 <pa...@mellanox.com>
Reviewed-by: Daniel Jurgens <dani...@mellanox.com>
Signed-off-by: Leon Romanovsky <l...@kernel.org>
Signed-off-by: Jason Gunthorpe <j...@mellanox.com>
Signed-off-by: Sasha Levin <alexander.le...@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org>
---
 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;


Reply via email to