net: phy: marvell: Fix deadlock from wrong locking
authorAndrew Lunn <andrew@lunn.ch>
Thu, 10 Jan 2019 23:15:21 +0000 (00:15 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 31 Jan 2019 07:14:33 +0000 (08:14 +0100)
commitc9fe9d194d4513d5902a4e79db0092ace010e572
treed8d5a5f741ce2e754e398eb71e7f225515b8d779
parent552cd931b483c8c0bd19fa67fb2453fa942edc32
net: phy: marvell: Fix deadlock from wrong locking

[ Upstream commit e0a7328fad9979104f73e19bedca821ef3262ae1 ]

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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/phy/marvell.c