From: Ido Schimmel <idosch@idosch.org>
To: Amit Cohen <amcohen@nvidia.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net, kuba@kernel.org,
mkubecek@suse.cz, idosch@nvidia.com, Jiri Pirko <jiri@nvidia.com>
Subject: Re: [PATCH net] ethtool: strset: Fix reply_size value
Date: Thu, 17 Jun 2021 19:29:09 +0300 [thread overview]
Message-ID: <YMt4VaNZOcRZ8xRP@shredder> (raw)
In-Reply-To: <20210617154252.688724-1-amcohen@nvidia.com>
On Thu, Jun 17, 2021 at 06:42:52PM +0300, Amit Cohen wrote:
> strset_reply_size() does not take into account the size required for the
> 'ETHTOOL_A_STRSET_STRINGSETS' nested attribute.
> Since commit 4d1fb7cde0cc ("ethtool: add a stricter length check") this
> results in the following warning in the kernel log:
>
> ethnl cmd 1: calculated reply length 2236, but consumed 2240
> WARNING: CPU: 2 PID: 30549 at net/ethtool/netlink.c:360 ethnl_default_doit+0x29f/0x310
>
> Add the appropriate size to the calculation.
>
> Fixes: 71921690f974 ("ethtool: provide string sets with STRSET_GET request")
> Signed-off-by: Amit Cohen <amcohen@nvidia.com>
> Reviewed-by: Jiri Pirko <jiri@nvidia.com>
> Reviewed-by: Ido Schimmel <idosch@nvidia.com>
> Tested-by: Ido Schimmel <idosch@nvidia.com>
Ha, seems this is addressed by commit e175aef90269 ("ethtool: strset:
fix message length calculation") in net.git which actually motivated
commit 4d1fb7cde0cc ("ethtool: add a stricter length check").
The former is still not in net-next.git, which is why the warning is
triggered there.
The patch can be dropped.
next prev parent reply other threads:[~2021-06-17 16:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-17 15:42 [PATCH net] ethtool: strset: Fix reply_size value Amit Cohen
2021-06-17 16:29 ` Ido Schimmel [this message]
2021-06-17 16:29 ` Michal Kubecek
2021-06-17 16:33 ` Ido Schimmel
2021-06-17 21:07 ` Jakub Kicinski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YMt4VaNZOcRZ8xRP@shredder \
--to=idosch@idosch.org \
--cc=amcohen@nvidia.com \
--cc=davem@davemloft.net \
--cc=idosch@nvidia.com \
--cc=jiri@nvidia.com \
--cc=kuba@kernel.org \
--cc=mkubecek@suse.cz \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox