mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 21:36:52 +00:00
mt76: use rcu_read_lock_bh in mt76_dma_rx_poll
Fixes potential RCU issues and avoids calling ieee80211_rx_napi with softirq enabled. Reported-by: Markus Theil <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
@@ -528,7 +528,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;
|
||||
|
||||
rcu_read_lock();
|
||||
rcu_read_lock_bh();
|
||||
|
||||
do {
|
||||
cur = mt76_dma_rx_process(dev, &dev->q_rx[qid], budget - done);
|
||||
@@ -536,7 +536,7 @@ mt76_dma_rx_poll(struct napi_struct *napi, int budget)
|
||||
done += cur;
|
||||
} while (cur && done < budget);
|
||||
|
||||
rcu_read_unlock();
|
||||
rcu_read_unlock_bh();
|
||||
|
||||
if (done < budget && napi_complete(napi))
|
||||
dev->drv->rx_poll_complete(dev, qid);
|
||||
|
||||
Reference in New Issue
Block a user