mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
mt76: drop rcu read lock in mt76_rx_aggr_stop
A rcu read locked section is not allowed to sleep, and the rcu lock here isn't actually necessary, because we're holding dev->mutex. Fixes an issue when the tid work item is still running while freeing a station or stopping the aggregation session Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
@@ -279,17 +279,13 @@ static void mt76_rx_aggr_shutdown(struct mt76_dev *dev, struct mt76_rx_tid *tid)
|
|||||||
|
|
||||||
void mt76_rx_aggr_stop(struct mt76_dev *dev, struct mt76_wcid *wcid, u8 tidno)
|
void mt76_rx_aggr_stop(struct mt76_dev *dev, struct mt76_wcid *wcid, u8 tidno)
|
||||||
{
|
{
|
||||||
struct mt76_rx_tid *tid;
|
struct mt76_rx_tid *tid = NULL;
|
||||||
|
|
||||||
rcu_read_lock();
|
rcu_swap_protected(wcid->aggr[tidno], tid,
|
||||||
|
lockdep_is_held(&dev->mutex));
|
||||||
tid = rcu_dereference(wcid->aggr[tidno]);
|
|
||||||
if (tid) {
|
if (tid) {
|
||||||
rcu_assign_pointer(wcid->aggr[tidno], NULL);
|
|
||||||
mt76_rx_aggr_shutdown(dev, tid);
|
mt76_rx_aggr_shutdown(dev, tid);
|
||||||
kfree_rcu(tid, rcu_head);
|
kfree_rcu(tid, rcu_head);
|
||||||
}
|
}
|
||||||
|
|
||||||
rcu_read_unlock();
|
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(mt76_rx_aggr_stop);
|
EXPORT_SYMBOL_GPL(mt76_rx_aggr_stop);
|
||||||
|
|||||||
Reference in New Issue
Block a user