mt76: mt7921: add missing bh-disable around rx napi schedule
authorLorenzo Bianconi <lorenzo@kernel.org>
Fri, 3 Jun 2022 07:35:00 +0000 (09:35 +0200)
committerFelix Fietkau <nbd@nbd.name>
Mon, 11 Jul 2022 11:40:01 +0000 (13:40 +0200)
napi_schedule() can call __raise_softirq_irqoff(), which can perform
softirq handling, so it must not be called in a pure process context
with BH enabled.

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mt7921/mac.c

index a630ddbf19e541f65e899f76ee2454c59755f796..01ed779d39769fe5a4093a910dd163f363085f4f 100644 (file)
@@ -1538,8 +1538,10 @@ void mt7921_pm_wake_work(struct work_struct *work)
                        mt76_connac_pm_dequeue_skbs(mphy, &dev->pm);
                        mt76_worker_schedule(&mdev->sdio.txrx_worker);
                } else {
+                       local_bh_disable();
                        mt76_for_each_q_rx(mdev, i)
                                napi_schedule(&mdev->napi[i]);
+                       local_bh_enable();
                        mt76_connac_pm_dequeue_skbs(mphy, &dev->pm);
                        mt7921_mcu_tx_cleanup(dev);
                }