Commit 99ee9243 authored by Parav Pandit's avatar Parav Pandit Committed by Greg Kroah-Hartman

RDMA/cma: Use correct size when writing netlink stats


[ Upstream commit 7baaa49a ]

The code was using the src size when formatting the dst. They are almost
certainly the same value but it reads wrong.

Fixes: ce117ffa ("RDMA/cma: Export AF_IB statistics")
Signed-off-by: default avatarParav Pandit <parav@mellanox.com>
Reviewed-by: default avatarDaniel Jurgens <danielj@mellanox.com>
Signed-off-by: default avatarLeon Romanovsky <leon@kernel.org>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
Signed-off-by: default avatarSasha Levin <alexander.levin@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 64e3d455
...@@ -4007,7 +4007,7 @@ static int cma_get_id_stats(struct sk_buff *skb, struct netlink_callback *cb) ...@@ -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)) RDMA_NL_RDMA_CM_ATTR_SRC_ADDR))
goto out; goto out;
if (ibnl_put_attr(skb, nlh, 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), cma_dst_addr(id_priv),
RDMA_NL_RDMA_CM_ATTR_DST_ADDR)) RDMA_NL_RDMA_CM_ATTR_DST_ADDR))
goto out; goto out;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment