aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorParav Pandit <parav@mellanox.com>2017-11-14 14:51:55 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-03-24 10:58:47 +0100
commit99ee92437fb149cd5b98f09b8cfb2f40eaca5245 (patch)
tree9edf6ae1987a908038b6c654c0c13c93c976b695
parent64e3d455331d456e1421b60e91e50ad8e340698f (diff)
downloadlinux-linaro-stable-99ee92437fb149cd5b98f09b8cfb2f40eaca5245.tar.gz
RDMA/cma: Use correct size when writing netlink stats
[ 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 <parav@mellanox.com> Reviewed-by: Daniel Jurgens <danielj@mellanox.com> Signed-off-by: Leon Romanovsky <leon@kernel.org> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/infiniband/core/cma.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c
index b6c9a370a38b..be5a407444f1 100644
--- a/drivers/infiniband/core/cma.c
+++ b/drivers/infiniband/core/cma.c
@@ -4007,7 +4007,7 @@ static int cma_get_id_stats(struct sk_buff *skb, struct 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;