[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8d6dc3dd-16cb-28dc-7870-29ff1708ca96@nvidia.com>
Date: Tue, 5 Oct 2021 12:03:37 +0300
From: Nikolay Aleksandrov <nikolay@...dia.com>
To: Eric Dumazet <eric.dumazet@...il.com>,
"David S . Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>
Cc: netdev <netdev@...r.kernel.org>,
Eric Dumazet <edumazet@...gle.com>,
Vivien Didelot <vivien.didelot@...il.com>
Subject: Re: [PATCH net 1/2] net: bridge: use nla_total_size_64bit() in
br_get_linkxstats_size()
On 05/10/2021 04:05, Eric Dumazet wrote:
> From: Eric Dumazet <edumazet@...gle.com>
>
> 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: 1080ab95e3c7 ("net: bridge: add support for IGMP/MLD stats and export them via netlink")
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>
> Cc: Nikolay Aleksandrov <nikolay@...dia.com>
> Cc: Vivien Didelot <vivien.didelot@...il.com>
> ---
> net/bridge/br_netlink.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/bridge/br_netlink.c b/net/bridge/br_netlink.c
> index 6c58fc14d2cb2de8bcd8364fc5e766247aba2e97..29b8f6373fb925d48ce876dcda7fccc10539240a 100644
> --- a/net/bridge/br_netlink.c
> +++ b/net/bridge/br_netlink.c
> @@ -1666,7 +1666,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(sizeof(struct br_mcast_stats)) +
> + nla_total_size_64bit(sizeof(struct br_mcast_stats)) +
> nla_total_size(0);
> }
>
>
Good catch. Thanks,
Acked-by: Nikolay Aleksandrov <nikolay@...dia.com>
Powered by blists - more mailing lists