mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-06 08:46:46 +00:00
wifi: mt76: mt7925e: fix use-after-free in free_irq()
From commita304e1b828
("[PATCH] Debug shared irqs"), there is a test to make sure the shared irq handler should be able to handle the unexpected event after deregistration. For this case, let's apply MT76_REMOVED flag to indicate the device was removed and do not run into the resource access anymore. Fixes:c948b5da6b
("wifi: mt76: mt7925: add Mediatek Wi-Fi7 driver for mt7925 chips") Signed-off-by: Deren Wu <deren.wu@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
c957280ef6
commit
a5a5f4413d
1 changed files with 1 additions and 0 deletions
|
@ -427,6 +427,7 @@ static void mt7925_pci_remove(struct pci_dev *pdev)
|
|||
struct mt792x_dev *dev = container_of(mdev, struct mt792x_dev, mt76);
|
||||
|
||||
mt7925e_unregister_device(dev);
|
||||
set_bit(MT76_REMOVED, &mdev->phy.state);
|
||||
devm_free_irq(&pdev->dev, pdev->irq, dev);
|
||||
mt76_free_device(&dev->mt76);
|
||||
pci_free_irq_vectors(pdev);
|
||||
|
|
Loading…
Reference in a new issue