Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 289970
b: refs/heads/master
c: 151a02f
h: refs/heads/master
v: v3
  • Loading branch information
Johannes Berg authored and John W. Linville committed Jan 24, 2012
1 parent 1d6b4a3 commit e41f631
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 24 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d5a2ca60e41fec4ede7b82d3608278523cffe77b
refs/heads/master: 151a02f693b866dd43e147725c818fc1ddb96aa3
31 changes: 8 additions & 23 deletions trunk/net/mac80211/sta_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -815,35 +815,20 @@ static int __must_check __sta_info_destroy(struct sta_info *sta)
}
#endif

/* There could be some memory leaks because of ampdu tx pending queue
* not being freed before destroying the station info.
*
* Make sure that such queues are purged before freeing the station
* info.
* TODO: We have to somehow postpone the full destruction
* until the aggregation stop completes. Refer
* http://thread.gmane.org/gmane.linux.kernel.wireless.general/81936
/*
* Destroy aggregation state here. It would be nice to wait for the
* driver to finish aggregation stop and then clean up, but for now
* drivers have to handle aggregation stop being requested, followed
* directly by station destruction.
*/

mutex_lock(&sta->ampdu_mlme.mtx);

for (i = 0; i < STA_TID_NUM; i++) {
tid_tx = rcu_dereference_protected_tid_tx(sta, i);
tid_tx = rcu_dereference_raw(sta->ampdu_mlme.tid_tx[i]);
if (!tid_tx)
continue;
if (skb_queue_len(&tid_tx->pending)) {
#ifdef CONFIG_MAC80211_HT_DEBUG
wiphy_debug(local->hw.wiphy, "TX A-MPDU purging %d "
"packets for tid=%d\n",
skb_queue_len(&tid_tx->pending), i);
#endif /* CONFIG_MAC80211_HT_DEBUG */
__skb_queue_purge(&tid_tx->pending);
}
kfree_rcu(tid_tx, rcu_head);
__skb_queue_purge(&tid_tx->pending);
kfree(tid_tx);
}

mutex_unlock(&sta->ampdu_mlme.mtx);

sta_info_free(local, sta);

return 0;
Expand Down

0 comments on commit e41f631

Please sign in to comment.