mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
net: dsa: mv88e6xxx: Fix deadlock by double lock
ethtool -S on a DSA interface can deadlock for some switches because
the same lock is taken twice. Use the register read function which
expects the lock to be already held.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Fixes: 31888234b7
("net: dsa: mv88e6xxx: Replace stats mutex with SMI mutex")
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
d691f9e8d4
commit
80edb722b9
1 changed files with 2 additions and 2 deletions
|
@ -703,7 +703,7 @@ static void _mv88e6xxx_get_ethtool_stats(struct dsa_switch *ds,
|
|||
u32 high = 0;
|
||||
|
||||
if (s->reg >= 0x100) {
|
||||
ret = mv88e6xxx_reg_read(ds, REG_PORT(port),
|
||||
ret = _mv88e6xxx_reg_read(ds, REG_PORT(port),
|
||||
s->reg - 0x100);
|
||||
if (ret < 0)
|
||||
goto error;
|
||||
|
|
Loading…
Reference in a new issue