rt2x00: fix a crash bug in the HT descriptor handling fix

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Fri Nov 22 17:59:06 EST 2013


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=b4089d6d8e71a7293e2192025dfa507a04f661c4
Commit:     b4089d6d8e71a7293e2192025dfa507a04f661c4
Parent:     6fcbe538be43e360dc286da532f5add2fe7f46d8
Author:     Felix Fietkau <nbd at openwrt.org>
AuthorDate: Thu Nov 14 21:33:15 2013 +0100
Committer:  John W. Linville <linville at tuxdriver.com>
CommitDate: Fri Nov 15 14:29:30 2013 -0500

    rt2x00: fix a crash bug in the HT descriptor handling fix
    
    Commit "rt2x00: fix HT TX descriptor settings regression"
    assumes that the control parameter to rt2x00mac_tx is always non-NULL.
    There is an internal call in rt2x00lib_bc_buffer_iter where NULL is
    passed. Fix the resulting crash by adding an initialized dummy on-stack
    ieee80211_tx_control struct.
    
    Cc: stable at vger.kernel.org # 3.7+
    Signed-off-by: Felix Fietkau <nbd at openwrt.org>
    Acked-by: Gertjan van Wingerde <gwingerde at gmail.com>
    Signed-off-by: John W. Linville <linville at tuxdriver.com>
---
 drivers/net/wireless/rt2x00/rt2x00dev.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c
index 080b1fc..9dd92a7 100644
--- a/drivers/net/wireless/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
@@ -181,6 +181,7 @@ static void rt2x00lib_autowakeup(struct work_struct *work)
 static void rt2x00lib_bc_buffer_iter(void *data, u8 *mac,
 				     struct ieee80211_vif *vif)
 {
+	struct ieee80211_tx_control control = {};
 	struct rt2x00_dev *rt2x00dev = data;
 	struct sk_buff *skb;
 
@@ -195,7 +196,7 @@ static void rt2x00lib_bc_buffer_iter(void *data, u8 *mac,
 	 */
 	skb = ieee80211_get_buffered_bc(rt2x00dev->hw, vif);
 	while (skb) {
-		rt2x00mac_tx(rt2x00dev->hw, NULL, skb);
+		rt2x00mac_tx(rt2x00dev->hw, &control, skb);
 		skb = ieee80211_get_buffered_bc(rt2x00dev->hw, vif);
 	}
 }



More information about the linux-mtd-cvs mailing list