Searched hist:"42624 d4913a00219a8fdbb4bafd634d1d843be85" (Results 1 – 2 of 2) sorted by relevance
/openbmc/linux/net/mac80211/ |
H A D | agg-tx.c | diff 42624d4913a00219a8fdbb4bafd634d1d843be85 Thu Dec 08 03:26:15 CST 2011 Yogesh Ashok Powar <yogeshp@marvell.com> 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>
|
H A D | sta_info.c | diff 27bf88829f50cf1af2b052ecee2f6f0dbe4a5141 Fri Dec 16 00:17:15 CST 2011 Yogesh Ashok Powar <yogesh.powar@gmail.com> mac80211: Fixing sparse warning at sta_info.c
The commit 42624d4913a00219a8fdbb4bafd634d1d843be85 created following sparse warning >net/mac80211/sta_info.c:965:24: warning: incorrect type in assignment (different address spaces) >net/mac80211/sta_info.c:965:24: expected struct tid_ampdu_tx *tid_tx >net/mac80211/sta_info.c:965:24: got struct tid_ampdu_tx [noderef] <asn:4>*<noident>
Making use of rcu_dereference_protected to fix the problem.
V2: - Replacing rcu_dereference with rcu_dereference_protected as suggested by Johannes. - Adding mutex_lock/unlock to satisfy the condition at rcu_dereference_protected
Cc: Nishant Sarmukadam <nishants@marvell.com> Reported-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com> diff 42624d4913a00219a8fdbb4bafd634d1d843be85 Thu Dec 08 03:26:15 CST 2011 Yogesh Ashok Powar <yogeshp@marvell.com> 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>
|