diff options
author | Felix Fietkau <nbd@openwrt.org> | 2013-01-09 16:16:53 +0100 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-01-11 14:12:01 -0500 |
commit | 1adb2e2b5f85023d17eb4f95386a57029df27c88 (patch) | |
tree | f2aab9f3053409f6929d0e23d39d9bde47e8aaac /drivers/net/wireless/ath/ath9k/beacon.c | |
parent | a3dc48e82bb146ef11cf75676c8410c1df29b0c4 (diff) | |
download | linux-stable-1adb2e2b5f85023d17eb4f95386a57029df27c88.tar.gz linux-stable-1adb2e2b5f85023d17eb4f95386a57029df27c88.tar.bz2 linux-stable-1adb2e2b5f85023d17eb4f95386a57029df27c88.zip |
ath9k: fix double-free bug on beacon generate failure
When the next beacon is sent, the ath_buf from the previous run is reused.
If getting a new beacon from mac80211 fails, bf->bf_mpdu is not reset, yet
the skb is freed, leading to a double-free on the next beacon tx attempt,
resulting in a system crash.
Cc: stable@vger.kernel.org
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/beacon.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/beacon.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/beacon.c b/drivers/net/wireless/ath/ath9k/beacon.c index 531fffd801a3..4eb269d6b974 100644 --- a/drivers/net/wireless/ath/ath9k/beacon.c +++ b/drivers/net/wireless/ath/ath9k/beacon.c @@ -147,6 +147,7 @@ static struct ath_buf *ath9k_beacon_generate(struct ieee80211_hw *hw, skb->len, DMA_TO_DEVICE); dev_kfree_skb_any(skb); bf->bf_buf_addr = 0; + bf->bf_mpdu = NULL; } skb = ieee80211_beacon_get(hw, vif); |