diff options
author | Vivien Didelot <vivien.didelot@savoirfairelinux.com> | 2017-09-26 20:57:21 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-09-28 19:28:24 +0200 |
commit | b32ca44a88def4bf92626d8777494c6f14638c42 (patch) | |
tree | 6204f56250e49dd6d73f31815795ccac1a2d5704 /drivers/net | |
parent | packet: only test po->has_vnet_hdr once in packet_snd (diff) | |
download | linux-b32ca44a88def4bf92626d8777494c6f14638c42.tar.xz linux-b32ca44a88def4bf92626d8777494c6f14638c42.zip |
net: dsa: mv88e6xxx: lock mutex when freeing IRQs
mv88e6xxx_g2_irq_free locks the registers mutex, but not
mv88e6xxx_g1_irq_free, which results in a stack trace from
assert_reg_lock when unloading the mv88e6xxx module. Fix this.
Fixes: 3460a5770ce9 ("net: dsa: mv88e6xxx: Mask g1 interrupts and free interrupt")
Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/dsa/mv88e6xxx/chip.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c index 674dab71d71c..d74c7335c512 100644 --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c @@ -3951,7 +3951,9 @@ static void mv88e6xxx_remove(struct mdio_device *mdiodev) if (chip->irq > 0) { if (chip->info->g2_irqs > 0) mv88e6xxx_g2_irq_free(chip); + mutex_lock(&chip->reg_lock); mv88e6xxx_g1_irq_free(chip); + mutex_unlock(&chip->reg_lock); } } |