[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f1fc2b74-4422-18c1-d2a1-431115f6bc8f@nvidia.com>
Date: Tue, 5 Oct 2021 15:08:50 -0700
From: Roopa Prabhu <roopa@...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>
Subject: Re: [PATCH net] rtnetlink: fix if_nlmsg_stats_size() under estimation
On 10/5/21 2:04 PM, Eric Dumazet wrote:
> From: Eric Dumazet <edumazet@...gle.com>
>
> rtnl_fill_statsinfo() is filling skb with one mandatory if_stats_msg structure.
>
> nlmsg_put(skb, pid, seq, type, sizeof(struct if_stats_msg), flags);
>
> But if_nlmsg_stats_size() never considered the needed storage.
>
> This bug did not show up because alloc_skb(X) allocates skb with
> extra tailroom, because of added alignments. This could very well
> be changed in the future to have deterministic behavior.
>
> Fixes: 10c9ead9f3c6 ("rtnetlink: add new RTM_GETSTATS message to dump link stats")
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>
> Cc: Roopa Prabhu <roopa@...dia.com>
> ---
Acked-by: Roopa Prabhu <roopa@...dia.com>
don't know how i missed this. Thanks for the patch Eric.
Powered by blists - more mailing lists