Andrew Lunn 4509000a25 phy: phy_ethtool_ksettings_set: Lock the PHY while changing settings
commit af1a02aa23c37045e6adfcf074cf7dbac167a403 upstream.

There is a race condition where the PHY state machine can change
members of the phydev structure at the same time userspace requests a
change via ethtool. To prevent this, have phy_ethtool_ksettings_set
take the PHY lock.

Fixes: 2d55173e71b0 ("phy: add generic function to support ksetting support")
Reported-by: Walter Stoll <Walter.Stoll@duagon.com>
Suggested-by: Walter Stoll <Walter.Stoll@duagon.com>
Tested-by: Walter Stoll <Walter.Stoll@duagon.com>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-02 19:48:24 +01:00
..
2021-09-22 12:27:56 +02:00
2021-03-30 14:32:05 +02:00
2021-03-30 14:32:05 +02:00
2020-08-27 06:55:51 -07:00
2021-03-30 14:32:05 +02:00
2021-03-30 14:32:05 +02:00
2020-06-19 20:17:15 -07:00
2020-09-28 15:14:42 -07:00