]> git.baikalelectronics.ru Git - kernel.git/commit
net: bridge: fix under estimation in br_get_linkxstats_size()
authorEric Dumazet <edumazet@google.com>
Tue, 5 Oct 2021 01:05:08 +0000 (18:05 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 5 Oct 2021 11:39:07 +0000 (12:39 +0100)
commit8091857f14bb56e76d89918b1fbd984c6edd7b64
tree7b0069b5ff26774c06cbda2b48515aed3f762ae1
parentf495627aef4e554a133d46af5ed3050f804e84d6
net: bridge: fix under estimation in br_get_linkxstats_size()

Commit 6e6ca79a1fdc ("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: 6e6ca79a1fdc ("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>
net/bridge/br_netlink.c