Skip to content

Commit

Permalink
mt76: disable bh in mt76_dma_rx_poll
Browse files Browse the repository at this point in the history
Fixes potential RCU issues and avoids calling ieee80211_rx_napi with softirq
enabled.

Signed-off-by: Felix Fietkau <[email protected]>
  • Loading branch information
nbd168 committed Dec 5, 2019
1 parent fff2c07 commit b3bf83d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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);
Expand Down

0 comments on commit b3bf83d

Please sign in to comment.