forked from luck/tmp_suning_uos_patched
net: bridge: fix under estimation in br_get_linkxstats_size()
[ Upstream commit 0854a0513321cf70bea5fa483ebcaa983cc7c62e ] Commitde1799667b
("net: bridge: add STP xstats") added an additional nla_reserve_64bit() in br_fill_linkxstats(), but forgot to update br_get_linkxstats_size() accordingly. This can trigger the following in rtnl_stats_get() WARN_ON(err == -EMSGSIZE); Fixes:de1799667b
("net: bridge: add STP xstats") Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Vivien Didelot <vivien.didelot@gmail.com> Cc: Nikolay Aleksandrov <nikolay@nvidia.com> Acked-by: Nikolay Aleksandrov <nikolay@nvidia.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
c480d15190
commit
60955b65bd
|
@ -1591,6 +1591,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)) +
|
||||
nla_total_size_64bit(sizeof(struct br_mcast_stats)) +
|
||||
(p ? nla_total_size_64bit(sizeof(p->stp_xstats)) : 0) +
|
||||
nla_total_size(0);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user