[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20101212234521.2CCBBB27C0@basil.firstfloor.org>
Date: Mon, 13 Dec 2010 00:45:21 +0100 (CET)
From: Andi Kleen <andi@...stfloor.org>
To: chunkeey@...glemail.com, linville@...driver.com, gregkh@...e.de,
ak@...ux.intel.com, linux-kernel@...r.kernel.org, stable@...nel.org
Subject: [PATCH] [25/223] mac80211: don't sanitize invalid rates
2.6.35-longterm review patch. If anyone has any objections, please let me know.
------------------
From: Christian Lamparter <chunkeey@...glemail.com>
commit 5f4e6b2d3c74c1adda1cbfd9d9d30da22c7484fc upstream.
I found this bug while poking around with a pure-gn AP.
Commit:
cfg80211/mac80211: Use more generic bitrate mask for rate control
Added some sanity checks to ensure that each tx rate index
is included in the configured mask and it would change any
rate indexes if it wasn't.
But, the current implementation doesn't take into account
that the invalid rate index "-1" has a special meaning
(= no further attempts) and it should not be "changed".
Signed-off-by: Christian Lamparter <chunkeey@...glemail.com>
Signed-off-by: John W. Linville <linville@...driver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@...e.de>
Signed-off-by: Andi Kleen <ak@...ux.intel.com>
---
net/mac80211/rate.c | 3 +++
1 file changed, 3 insertions(+)
Index: linux/net/mac80211/rate.c
===================================================================
--- linux.orig/net/mac80211/rate.c
+++ linux/net/mac80211/rate.c
@@ -326,6 +326,9 @@ void rate_control_get_rate(struct ieee80
* if needed.
*/
for (i = 0; i < IEEE80211_TX_MAX_RATES; i++) {
+ /* Skip invalid rates */
+ if (info->control.rates[i].idx < 0)
+ break;
/* Rate masking supports only legacy rates for now */
if (info->control.rates[i].flags & IEEE80211_TX_RC_MCS)
continue;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists