[lvc-project] [PATCH v1] net/ethtool/ioctl: ensure that we have phy ops before using them
Daniil Tatianin
d-tatianin at yandex-team.ru
Thu Nov 17 10:07:32 MSK 2022
On 11/17/22 1:55 AM, Saeed Mahameed wrote:
> On 15 Nov 16:40, Andrew Lunn wrote:
>> 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
>
> same! I only see Jakub's reply, maybe the patch didn't make it through to
> netdev ML ?
Strange, pretty sure it CCed the netdev ML. Unless there's something
else you must do for it to get through?
More information about the lvc-project
mailing list