diff options
| author | Maxime Chevallier <[email protected]> | 2024-09-10 17:46:35 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2024-09-11 23:38:10 +0000 |
| commit | fce1e9f86af13cbd6696ef0c8775990559108f45 (patch) | |
| tree | 7fb1937dfeb945f87b565cfaabb5ec52f230658f /net/core/netdev_rx_queue.c | |
| parent | net: gianfar: fix NVMEM mac address (diff) | |
| download | kernel-fce1e9f86af13cbd6696ef0c8775990559108f45.tar.gz kernel-fce1e9f86af13cbd6696ef0c8775990559108f45.zip | |
net: ethtool: phy: Check the req_info.pdn field for GET commands
When processing the netlink GET requests to get PHY info, the req_info.pdn
pointer is NULL when no PHY matches the requested parameters, such as when
the phy_index is invalid, or there's simply no PHY attached to the
interface.
Therefore, check the req_info.pdn pointer for NULL instead of
dereferencing it.
Suggested-by: Eric Dumazet <[email protected]>
Reported-by: Eric Dumazet <[email protected]>
Closes: https://lore.kernel.org/netdev/CANn89iKRW0WpGAh1tKqY345D8WkYCPm3Y9ym--Si42JZrQAu1g@mail.gmail.com/T/#mfced87d607d18ea32b3b4934dfa18d7b36669285
Fixes: 17194be4c8e1 ("net: ethtool: Introduce a command to list PHYs on an interface")
Signed-off-by: Maxime Chevallier <[email protected]>
Reviewed-by: Eric Dumazet <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'net/core/netdev_rx_queue.c')
0 files changed, 0 insertions, 0 deletions
