diff options
author | Juuso Oikarinen <juuso.oikarinen@nokia.com> | 2010-03-26 06:53:27 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-03-31 14:39:15 -0400 |
commit | cbf7f3058ea17d9413a6889c3a229e8eac7a7c78 (patch) | |
tree | fee31dc54bd0b9ddfe6967d2aaa376aa39bc9203 | |
parent | 64e29e447ec01d2130b4c68f3459cfaa94fa138b (diff) |
wl1271: Fix memory leak in firmware crash scenario
The driver tx-queue flush operation leaks broadcast-frames. This leak occurs
if the driver is shut down while there are frames in TX buffers (such as in
a firmware crash scenario.) Fix the leak.
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1271_tx.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271_tx.c b/drivers/net/wireless/wl12xx/wl1271_tx.c index 5712489f5ddb..66b48b70444e 100644 --- a/drivers/net/wireless/wl12xx/wl1271_tx.c +++ b/drivers/net/wireless/wl12xx/wl1271_tx.c | |||
@@ -426,8 +426,10 @@ void wl1271_tx_flush(struct wl1271 *wl) | |||
426 | 426 | ||
427 | wl1271_debug(DEBUG_TX, "flushing skb 0x%p", skb); | 427 | wl1271_debug(DEBUG_TX, "flushing skb 0x%p", skb); |
428 | 428 | ||
429 | if (!(info->flags & IEEE80211_TX_CTL_REQ_TX_STATUS)) | 429 | if (!(info->flags & IEEE80211_TX_CTL_REQ_TX_STATUS)) { |
430 | continue; | 430 | kfree_skb(skb); |
431 | continue; | ||
432 | } | ||
431 | 433 | ||
432 | ieee80211_tx_status(wl->hw, skb); | 434 | ieee80211_tx_status(wl->hw, skb); |
433 | } | 435 | } |
@@ -437,8 +439,10 @@ void wl1271_tx_flush(struct wl1271 *wl) | |||
437 | skb = wl->tx_frames[i]; | 439 | skb = wl->tx_frames[i]; |
438 | info = IEEE80211_SKB_CB(skb); | 440 | info = IEEE80211_SKB_CB(skb); |
439 | 441 | ||
440 | if (!(info->flags & IEEE80211_TX_CTL_REQ_TX_STATUS)) | 442 | if (!(info->flags & IEEE80211_TX_CTL_REQ_TX_STATUS)) { |
443 | kfree_skb(skb); | ||
441 | continue; | 444 | continue; |
445 | } | ||
442 | 446 | ||
443 | ieee80211_tx_status(wl->hw, skb); | 447 | ieee80211_tx_status(wl->hw, skb); |
444 | wl->tx_frames[i] = NULL; | 448 | wl->tx_frames[i] = NULL; |