Skip to content

Commit b32ca44

Browse files
viviendavem330
authored andcommitted
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: 3460a57 ("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>
1 parent da7c956 commit b32ca44

File tree

1 file changed

+2
-0
lines changed
  • drivers/net/dsa/mv88e6xxx

1 file changed

+2
-0
lines changed

drivers/net/dsa/mv88e6xxx/chip.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3951,7 +3951,9 @@ static void mv88e6xxx_remove(struct mdio_device *mdiodev)
39513951
if (chip->irq > 0) {
39523952
if (chip->info->g2_irqs > 0)
39533953
mv88e6xxx_g2_irq_free(chip);
3954+
mutex_lock(&chip->reg_lock);
39543955
mv88e6xxx_g1_irq_free(chip);
3956+
mutex_unlock(&chip->reg_lock);
39553957
}
39563958
}
39573959

0 commit comments

Comments
 (0)