]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ath9k: stop on rates with idx -1 in ath9k rate control's .tx_status
authorPavel Roskin <proski@gnu.org>
Sat, 11 Feb 2012 15:01:53 +0000 (10:01 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 1 Mar 2012 00:34:28 +0000 (16:34 -0800)
commit6778e220c09cdfb19a326192fd25ee146755b95d
tree8637fd9630f314b8a7b4d710396d2d2e71fe6aa7
parent534b465e1cf6e3bbceebbc7866a204107b83eb95
ath9k: stop on rates with idx -1 in ath9k rate control's .tx_status

commit 2504a6423b9ab4c36df78227055995644de19edb upstream.

Rate control algorithms are supposed to stop processing when they
encounter a rate with the index -1.  Checking for rate->count not being
zero is not enough.

Allowing a rate with negative index leads to memory corruption in
ath_debug_stat_rc().

One consequence of the bug is discussed at
https://bugzilla.redhat.com/show_bug.cgi?id=768639

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wireless/ath/ath9k/rc.c