]> git.baikalelectronics.ru Git - kernel.git/commit
mac80211: Purge A-MPDU TX queues before station destructions
authorYogesh Ashok Powar <yogeshp@marvell.com>
Thu, 8 Dec 2011 09:26:15 +0000 (14:56 +0530)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 13 Dec 2011 20:30:33 +0000 (15:30 -0500)
commit8387c93487207f8cef7fbb8ab2bb5eee9229231f
tree0cf641329ff23e4ca159e44506ffa74cf9f9b623
parent1ad84036c258616f10e5af538617edbd7b863d8f
mac80211: Purge A-MPDU TX queues before station destructions

When a station leaves suddenly while ampdu traffic to that station is still
running, there is a possibility that the ampdu pending queues are not freed due
to a race condition leading to memory leaks. In '__sta_info_destroy' when we
attempt to destroy the ampdu sessions in 'ieee80211_sta_tear_down_BA_sessions',
the driver calls 'ieee80211_stop_tx_ba_cb_irqsafe' to delete the ampdu
structures (tid_tx) and splice the pending queues and this job gets queued in
sdata workqueue. However, the sta entry can get destroyed before the above work
gets scheduled and hence the race.

Purging the queues and freeing the tid_tx to avoid the leak. The better solution
would be to fix the race, but that can be taken up in a separate patch.

Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/agg-tx.c
net/mac80211/sta_info.c