net: phy: always call phy_process_state_change() under lock
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Thu, 14 Sep 2023 15:35:31 +0000 (16:35 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sun, 17 Sep 2023 13:31:23 +0000 (14:31 +0100)
commit8da77df649c43d9cec70d683ee317ba5d49d09b7
tree482523f3da161f261a0bb252553d78a2e851ac41
parent002841be134e60994a34b510eebf5f091d0cd6c6
net: phy: always call phy_process_state_change() under lock

phy_stop() calls phy_process_state_change() while holding the phydev
lock, so also arrange for phy_state_machine() to do the same, so that
this function is called with consistent locking.

Tested-by: Jijie Shao <shaojijie@huawei.com>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/phy.c