From: Jakub Kicinski <kuba@kernel.org>
To: Daniil Tatianin <d-tatianin@yandex-team.ru>
Cc: "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>,
Hao Chen <chenhao288@hisilicon.com>,
Guangbin Huang <huangguangbin2@huawei.com>,
Tom Rix <trix@redhat.com>, Julian Wiedmann <jwi@linux.ibm.com>,
Marco Bonelli <marco@mebeim.net>,
Wolfram Sang <wsa+renesas@sang-engineering.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
lvc-project@linuxtesting.org, yc-core@yandex-team.ru
Subject: Re: [PATCH v2] net/ethtool/ioctl: ensure that we have phy ops before using them
Date: Mon, 21 Nov 2022 20:29:44 -0800 [thread overview]
Message-ID: <20221121202944.3d4a7103@kernel.org> (raw)
In-Reply-To: <20221121140556.41763-1-d-tatianin@yandex-team.ru>
On Mon, 21 Nov 2022 17:05:56 +0300 Daniil Tatianin wrote:
> ops->get_ethtool_phy_stats was getting called in an else branch
> of ethtool_get_phy_stats() unconditionally without making sure
> it was actually present.
>
> Refactor the checks to avoid unnecessary nesting and make them more
> readable. Add an extra WARN_ON_ONCE(1) to emit a warning when a driver
> declares that it has phy stats without a way to retrieve them.
>
> Found by Linux Verification Center (linuxtesting.org) with the SVACE
> static analysis tool.
>
> Suggested-by: Jakub Kicinski <kuba@kernel.org>
> Signed-off-by: Daniil Tatianin <d-tatianin@yandex-team.ru>
Didn't make it to the list again :S Maybe try stripping the To/CC to
just netdev@, Andrew Lunn and Michal Kubecek?
next parent reply other threads:[~2022-11-22 4:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20221121140556.41763-1-d-tatianin@yandex-team.ru>
2022-11-22 4:29 ` Jakub Kicinski [this message]
2022-11-22 7:21 [PATCH v2] net/ethtool/ioctl: ensure that we have phy ops before using them Daniil Tatianin
2022-11-22 17:37 ` Andrew Lunn
2022-11-23 16:06 ` Alexander Lobakin
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=20221121202944.3d4a7103@kernel.org \
--to=kuba@kernel.org \
--cc=chenhao288@hisilicon.com \
--cc=d-tatianin@yandex-team.ru \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=huangguangbin2@huawei.com \
--cc=jwi@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lvc-project@linuxtesting.org \
--cc=marco@mebeim.net \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=trix@redhat.com \
--cc=wsa+renesas@sang-engineering.com \
--cc=yc-core@yandex-team.ru \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.