wifi: mt76: mt7925e: fix use-after-free in free_irq()
authorDeren Wu <deren.wu@mediatek.com>
Sat, 13 Jan 2024 09:00:23 +0000 (17:00 +0800)
committerFelix Fietkau <nbd@nbd.name>
Thu, 22 Feb 2024 08:55:19 +0000 (09:55 +0100)
commita5a5f4413d91f395cb2d89829d376d7393ad48b9
tree483a67b8cd5e01adcac19f33875cb8257b6277b4
parentc957280ef6ab6bdf559a91ae693a6b34310697e3
wifi: mt76: mt7925e: fix use-after-free in free_irq()

From commit a304e1b82808 ("[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: c948b5da6bbe ("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>
drivers/net/wireless/mediatek/mt76/mt7925/pci.c