]> git.baikalelectronics.ru Git - kernel.git/commitdiff
mt76: disable bh in mt76_dma_rx_poll
authorFelix Fietkau <nbd@nbd.name>
Thu, 5 Dec 2019 16:46:42 +0000 (17:46 +0100)
committerFelix Fietkau <nbd@nbd.name>
Fri, 14 Feb 2020 09:06:00 +0000 (10:06 +0100)
Fixes potential RCU issues and avoids calling ieee80211_rx_napi with softirq
enabled.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/dma.c

index 2298a4e919436448a218a203f0b6f9f23a53a387..9e03a7871ff449a49d474dea87c2aadae7b7dfe3 100644 (file)
@@ -538,6 +538,7 @@ mt76_dma_rx_poll(struct napi_struct *napi, int budget)
        dev = container_of(napi->dev, struct mt76_dev, napi_dev);
        qid = napi - dev->napi;
 
+       local_bh_disable();
        rcu_read_lock();
 
        do {
@@ -547,6 +548,7 @@ mt76_dma_rx_poll(struct napi_struct *napi, int budget)
        } while (cur && done < budget);
 
        rcu_read_unlock();
+       local_bh_enable();
 
        if (done < budget && napi_complete(napi))
                dev->drv->rx_poll_complete(dev, qid);