[PATCH net v2 0/3] net/ethtool/ioctl: split ethtool_get_phy_stats into multiple helpers

Daniil Tatianin posted 3 patches 2 years, 8 months ago
net/ethtool/ioctl.c | 107 +++++++++++++++++++++++++++++---------------
1 file changed, 70 insertions(+), 37 deletions(-)
[PATCH net v2 0/3] net/ethtool/ioctl: split ethtool_get_phy_stats into multiple helpers
Posted by Daniil Tatianin 2 years, 8 months ago
This series fixes a potential NULL dereference in ethtool_get_phy_stats
while also attempting to refactor/split said function into multiple
helpers so that it's easier to reason about what's going on.

I've taken Andrew Lunn's suggestions on the previous version of this
patch and added a bit of my own.

Changes since v1:
- Remove an extra newline in the first patch
- Move WARN_ON_ONCE into the if check as it already returns the
  result of the comparison 
- Actually split ethtool_get_phy_stats instead of attempting to
  refactor it

Daniil Tatianin (3):
  net/ethtool/ioctl: return -EOPNOTSUPP if we have no phy stats
  net/ethtool/ioctl: remove if n_stats checks from ethtool_get_phy_stats
  net/ethtool/ioctl: split ethtool_get_phy_stats into multiple helpers

 net/ethtool/ioctl.c | 107 +++++++++++++++++++++++++++++---------------
 1 file changed, 70 insertions(+), 37 deletions(-)

-- 
2.25.1
Re: [PATCH net v2 0/3] net/ethtool/ioctl: split ethtool_get_phy_stats into multiple helpers
Posted by patchwork-bot+netdevbpf@kernel.org 2 years, 8 months ago
Hello:

This series was applied to netdev/net.git (master)
by David S. Miller <davem@davemloft.net>:

On Mon, 26 Dec 2022 14:48:22 +0300 you wrote:
> This series fixes a potential NULL dereference in ethtool_get_phy_stats
> while also attempting to refactor/split said function into multiple
> helpers so that it's easier to reason about what's going on.
> 
> I've taken Andrew Lunn's suggestions on the previous version of this
> patch and added a bit of my own.
> 
> [...]

Here is the summary with links:
  - [net,v2,1/3] net/ethtool/ioctl: return -EOPNOTSUPP if we have no phy stats
    https://git.kernel.org/netdev/net/c/9deb1e9fb88b
  - [net,v2,2/3] net/ethtool/ioctl: remove if n_stats checks from ethtool_get_phy_stats
    https://git.kernel.org/netdev/net/c/fd4778581d61
  - [net,v2,3/3] net/ethtool/ioctl: split ethtool_get_phy_stats into multiple helpers
    https://git.kernel.org/netdev/net/c/201ed315f967

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html