From: Leon Romanovsky <leon@kernel.org>
To: Simon Horman <simon.horman@corigine.com>
Cc: David Miller <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
netdev@vger.kernel.org, oss-drivers@corigine.com,
James Hershaw <james.hershaw@corigine.com>,
Louis Peens <louis.peens@corigine.com>
Subject: Re: [PATCH net-next] nfp: flower: add check for flower VF netdevs for get/set_eeprom
Date: Tue, 7 Feb 2023 12:09:31 +0200 [thread overview]
Message-ID: <Y+IjW9F23QT9eu3w@unreal> (raw)
In-Reply-To: <20230206154836.2803995-1-simon.horman@corigine.com>
On Mon, Feb 06, 2023 at 04:48:36PM +0100, Simon Horman wrote:
> From: James Hershaw <james.hershaw@corigine.com>
>
> Move the nfp_net_get_port_mac_by_hwinfo() check to ahead in the
> get/set_eeprom() functions to in order to check for a VF netdev, which
> this function does not support.
>
> It is debatable if this is a fix or an enhancement, and we have chosen
> to go for the latter. It does address a problem introduced by
> commit 74b4f1739d4e ("nfp: flower: change get/set_eeprom logic and enable for flower reps").
> However, the ethtool->len == 0 check avoids the problem manifesting as a
> run-time bug (NULL pointer dereference of app).
>
> Signed-off-by: James Hershaw <james.hershaw@corigine.com>
> Reviewed-by: Louis Peens <louis.peens@corigine.com>
> Signed-off-by: Simon Horman <simon.horman@corigine.com>
> ---
> drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
Thanks,
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
next prev parent reply other threads:[~2023-02-07 10:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-06 15:48 [PATCH net-next] nfp: flower: add check for flower VF netdevs for get/set_eeprom Simon Horman
2023-02-07 10:09 ` Leon Romanovsky [this message]
2023-02-08 4:30 ` patchwork-bot+netdevbpf
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=Y+IjW9F23QT9eu3w@unreal \
--to=leon@kernel.org \
--cc=davem@davemloft.net \
--cc=james.hershaw@corigine.com \
--cc=kuba@kernel.org \
--cc=louis.peens@corigine.com \
--cc=netdev@vger.kernel.org \
--cc=oss-drivers@corigine.com \
--cc=pabeni@redhat.com \
--cc=simon.horman@corigine.com \
/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;
as well as URLs for NNTP newsgroup(s).