提交 34f30d59 编写于 作者: E Eric Dumazet 提交者: Zheng Zengkai

net: bridge: use nla_total_size_64bit() in br_get_linkxstats_size()

stable inclusion
from stable-5.10.73
commit c480d15190eba5a552aa66570dceeaba4863048b
bugzilla: 182983 https://gitee.com/openeuler/kernel/issues/I4I3M0

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=c480d15190eba5a552aa66570dceeaba4863048b

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

[ Upstream commit dbe0b880 ]

bridge_fill_linkxstats() is using nla_reserve_64bit().

We must use nla_total_size_64bit() instead of nla_total_size()
for corresponding data structure.

Fixes: 1080ab95 ("net: bridge: add support for IGMP/MLD stats and export them via netlink")
Signed-off-by: NEric Dumazet <edumazet@google.com>
Cc: Nikolay Aleksandrov <nikolay@nvidia.com>
Cc: Vivien Didelot <vivien.didelot@gmail.com>
Acked-by: NNikolay Aleksandrov <nikolay@nvidia.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Acked-by: NWeilong Chen <chenweilong@huawei.com>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 80e9a616
...@@ -1590,7 +1590,7 @@ static size_t br_get_linkxstats_size(const struct net_device *dev, int attr) ...@@ -1590,7 +1590,7 @@ static size_t br_get_linkxstats_size(const struct net_device *dev, int attr)
} }
return numvls * nla_total_size(sizeof(struct bridge_vlan_xstats)) + return numvls * nla_total_size(sizeof(struct bridge_vlan_xstats)) +
nla_total_size(sizeof(struct br_mcast_stats)) + nla_total_size_64bit(sizeof(struct br_mcast_stats)) +
nla_total_size(0); nla_total_size(0);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册