Commit 9379df2f authored by Felix Fietkau's avatar Felix Fietkau

mt76: clear skb pointers from rx aggregation reorder buffer during cleanup

During the cleanup of the aggregation session, a rx handler (or release timer)
on another CPU might still hold a pointer to the reorder buffer and could
attempt to release some packets.
Clearing pointers during cleanup avoids a theoretical use-after-free bug here.
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent d55aa5e1
...@@ -276,6 +276,7 @@ static void mt76_rx_aggr_shutdown(struct mt76_dev *dev, struct mt76_rx_tid *tid) ...@@ -276,6 +276,7 @@ static void mt76_rx_aggr_shutdown(struct mt76_dev *dev, struct mt76_rx_tid *tid)
if (!skb) if (!skb)
continue; continue;
tid->reorder_buf[i] = NULL;
tid->nframes--; tid->nframes--;
dev_kfree_skb(skb); dev_kfree_skb(skb);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment