On Sat, 2021-06-19 at 01:37 +0200, Michal Kubecek wrote:
On Fri, Jun 18, 2021 at 03:55:02PM -0700, Saeed Mahameed wrote:
quoted
From: Saeed Mahameed <saeedm@nvidia.com>
The cited patch revealed a bug in strset reply size where the
calculation didn't include the 1st nla_nest_start(), a size of 4
Bytes in
strset_fill_reply().
To fix the issue we account for the missing nla_nest 4Bytes by
reporting
them in strset_reply_size()
Before this patch issuing "ethtool -k" command will produce the
following call trace:
[...]
Out of the three fixes, personally I liked most the one which applied
nla_total_len() to calculated length of the nest contents as it IMHO
reflects the message structure best; but adding nla_total_size(0)
also
provides the same result so either does the trick.
Michal
will go with the net fix, thanks for taking a look !