]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ath9k: fix a use-after-free-bug when ath_tx_setup_buffer() fails
authorFelix Fietkau <nbd@openwrt.org>
Thu, 24 May 2012 12:32:20 +0000 (14:32 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 9 Jun 2012 15:36:08 +0000 (00:36 +0900)
commitc163f56463e26f771e3dc7e67921f268053ad8e6
tree914440642daaecf00ec9f53c478f22b63d4f068b
parent27e73d90ba0c26397eaeed7119553e77ae5bb486
ath9k: fix a use-after-free-bug when ath_tx_setup_buffer() fails

commit 81357a281dcc454841532c46b30e6f2ba12b73ea upstream.

ath_tx_setup_buffer() can fail if there is no ath_buf left, or if mapping DMA
failed. In this case it frees the skb passed to it.
If ath_tx_setup_buffer is called from ath_tx_form_aggr, the skb is still
linked into the tid buffer list and must be dequeued before being released.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wireless/ath/ath9k/xmit.c