Skip to content
Commit 4509000a authored by Andrew Lunn's avatar Andrew Lunn Committed by Greg Kroah-Hartman
Browse files

phy: phy_ethtool_ksettings_set: Lock the PHY while changing settings

commit af1a02aa 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: 2d55173e

 ("phy: add generic function to support ksetting support")
Reported-by: default avatarWalter Stoll <Walter.Stoll@duagon.com>
Suggested-by: default avatarWalter Stoll <Walter.Stoll@duagon.com>
Tested-by: default avatarWalter Stoll <Walter.Stoll@duagon.com>
Signed-off-by: default avatarAndrew Lunn <andrew@lunn.ch>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5b88bb93
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment