]> git.baikalelectronics.ru Git - kernel.git/commit
Merge branch 'ksettings-locking-fixes'
authorDavid S. Miller <davem@davemloft.net>
Mon, 25 Oct 2021 13:06:43 +0000 (14:06 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 25 Oct 2021 13:06:43 +0000 (14:06 +0100)
commitaa3d9ecd602a717c1637859225d519f5364eb972
treee527db05dce25d753a20424239054648169bcca5
parent3fcf2d40ff1afaacebf86b46a8152dd6252e6d76
parent4019f4687be3f6978291e68fa197f42876057789
Merge branch 'ksettings-locking-fixes'

Andrew Lunn says:

====================
ksettings_{get|set} lock fixes

Walter Stoll <Walter.Stoll@duagon.com> reported a race condition
between "ethtool -s eth0 speed 100 duplex full autoneg off" and phylib
reading the current status from the PHY. Both ksetting_get and
ksetting_set fail the take the phydev mutex, and as a result, there is
a small window of time where the phydev members are not self
consistent.

Patch 1 fixes phy_ethtool_ksettings_get by adding the needed lock.
Patches 2 and 3 move code around and perform to refactoring, to allow
patch 4 to fix phy_ethtool_ksettings_set by added the lock.

Thanks go to Walter for the detailed origional report, suggested fix,
and testing of the proposed patches.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>