[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y3Oy14CNVEttEI7T@lunn.ch>
Date: Tue, 15 Nov 2022 16:40:07 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Jakub Kicinski <kuba@...nel.org>
Cc: Daniil Tatianin <d-tatianin@...dex-team.ru>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Paolo Abeni <pabeni@...hat.com>,
Hao Chen <chenhao288@...ilicon.com>,
Guangbin Huang <huangguangbin2@...wei.com>,
Wolfram Sang <wsa+renesas@...g-engineering.com>,
Marco Bonelli <marco@...eim.net>, Tom Rix <trix@...hat.com>,
Tonghao Zhang <xiangxia.m.yue@...il.com>,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
lvc-project@...uxtesting.org, yc-core@...dex-team.ru
Subject: Re: [PATCH v1] net/ethtool/ioctl: ensure that we have phy ops before
using them
On Mon, Nov 14, 2022 at 09:07:05PM -0800, Jakub Kicinski wrote:
> On Mon, 14 Nov 2022 11:15:32 +0300 Daniil Tatianin wrote:
> > + if (!(phydev && phy_ops && phy_ops->get_stats) &&
> > + !ops->get_ethtool_phy_stats)
>
> This condition is still complicated.
>
> > + return -EOPNOTSUPP;
>
> The only way this crash can happen is if driver incorrectly returns
> non-zero stats count but doesn't have a callback to read the stats.
> So WARN_ON() would be in order here.
Hi Daniil
I'm missing the patch itself, and b4 does not return it. Please
consider reposting. Since this appear to be to do with PHY statistics,
you should Cc: the PHY maintainers.
Andrew
Powered by blists - more mailing lists