* [PATCH net] net: phy: marvell: Fix deadlock from wrong locking
@ 2019-01-10 23:15 Andrew Lunn
2019-01-16 5:53 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Andrew Lunn @ 2019-01-10 23:15 UTC (permalink / raw)
To: David Miller
Cc: Florian Fainelli, Heiner Kallweit, netdev, ake.rehnman, Andrew Lunn
m88e1318_set_wol() takes the lock as part of phy_select_page(). Don't
take the lock again with phy_read(), use the unlocked __phy_read().
Fixes: 424ca4c55121 ("net: phy: marvell: fix paged access races")
Reported-by: Åke Rehnman <ake.rehnman@gmail.com>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
drivers/net/phy/marvell.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c
index ed07e706bb8f..e32a434004f2 100644
--- a/drivers/net/phy/marvell.c
+++ b/drivers/net/phy/marvell.c
@@ -1444,7 +1444,7 @@ static int m88e1318_set_wol(struct phy_device *phydev,
* before enabling it if !phy_interrupt_is_valid()
*/
if (!phy_interrupt_is_valid(phydev))
- phy_read(phydev, MII_M1011_IEVENT);
+ __phy_read(phydev, MII_M1011_IEVENT);
/* Enable the WOL interrupt */
err = __phy_modify(phydev, MII_88E1318S_PHY_CSIER, 0,
--
2.20.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net] net: phy: marvell: Fix deadlock from wrong locking
2019-01-10 23:15 [PATCH net] net: phy: marvell: Fix deadlock from wrong locking Andrew Lunn
@ 2019-01-16 5:53 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2019-01-16 5:53 UTC (permalink / raw)
To: andrew; +Cc: f.fainelli, hkallweit1, netdev, ake.rehnman
From: Andrew Lunn <andrew@lunn.ch>
Date: Fri, 11 Jan 2019 00:15:21 +0100
> m88e1318_set_wol() takes the lock as part of phy_select_page(). Don't
> take the lock again with phy_read(), use the unlocked __phy_read().
>
> Fixes: 424ca4c55121 ("net: phy: marvell: fix paged access races")
> Reported-by: Åke Rehnman <ake.rehnman@gmail.com>
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Applied and queued up for -stable.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-01-16 5:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-10 23:15 [PATCH net] net: phy: marvell: Fix deadlock from wrong locking Andrew Lunn
2019-01-16 5:53 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.