Skip to contentSkip to conversation

rt2x00: fix usage of NULL queue

PATCH In review Stanislaw Gruszka 3 participants 3 messages Aug 2, 2011 Networking drivers (wireless)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rt2x00: fix usage of NULL queue

We may call rt2x00queue_pause_queue(queue) with queue == NULL. Bug was introduced by commit 62fe778412b36791b7897cfa139342906fbbf07b "rt2x00: Fix stuck queue in tx failure case" .

---
 drivers/net/wireless/rt2x00/rt2x00mac.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
drivers/net/wireless/rt2x00/rt2x00mac.c +3 -2
index 8efab39..4ccf238 100644
@@ -113,7 +113,7 @@ void rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
 	 * due to possible race conditions in mac80211.
 	 */
 	if (!test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags))
-		goto exit_fail;
+		goto exit_free_skb;
 
 	/*
 	 * Use the ATIM queue if appropriate and present.
@@ -127,7 +127,7 @@ void rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
 		ERROR(rt2x00dev,
 		      "Attempt to send packet over invalid queue %d.\n"
 		      "Please file bug report to %s.\n", qid, DRV_PROJECT);
-		goto exit_fail;
+		goto exit_free_skb;
 	}
 
 	/*
@@ -159,6 +159,7 @@ void rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
 
  exit_fail:
 	rt2x00queue_pause_queue(queue);
+ exit_free_skb:
 	dev_kfree_skb_any(skb);
 }
 EXPORT_SYMBOL_GPL(rt2x00mac_tx);
Signature · 1 line
1.7.1
Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · Stanislaw Gruszka

We may call rt2x00queue_pause_queue(queue) with queue == NULL. Bug was introduced by commit 62fe778412b36791b7897cfa139342906fbbf07b "rt2x00: Fix stuck queue in tx failure case" .

Quoted 37 lines

---
 drivers/net/wireless/rt2x00/rt2x00mac.c |    5 +++--

 1 files changed, 3 insertions(+), 2 deletions(-)
drivers/net/wireless/rt2x00/rt2x00mac.c +1 -1
index 8efab39..4ccf238 100644
@@ -113,7 +113,7 @@ void rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
         * due to possible race conditions in mac80211.
         */
        if (!test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags))
-               goto exit_fail;
+               goto exit_free_skb;
 
        /*
         * Use the ATIM queue if appropriate and present.
@@ -127,7 +127,7 @@ void rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
                ERROR(rt2x00dev,

                     "Attempt to send packet over invalid queue %d.\n" "Please file bug report to %s.\n", qid, DRV_PROJECT);
-               goto exit_fail;
+               goto exit_free_skb;
       }

       /*

drivers/net/wireless/rt2x00/rt2x00mac.c +0 -0
@@ -159,6 +159,7 @@ void rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
 

 exit_fail:
       rt2x00queue_pause_queue(queue);
+ exit_free_skb:
       dev_kfree_skb_any(skb);
 }
 EXPORT_SYMBOL_GPL(rt2x00mac_tx);
--
1.7.1

Acked-by on v1 1/1
#2 lore raw
In reply to Stanislaw Gruszka
Quoted 6 lines · Stanislaw Gruszka

We may call rt2x00queue_pause_queue(queue) with queue == NULL. Bug was introduced by commit 62fe778412b36791b7897cfa139342906fbbf07b "rt2x00: Fix stuck queue in tx failure case" .

Good catch.

Quoted 37 lines

---
 drivers/net/wireless/rt2x00/rt2x00mac.c |    5 +++--

 1 files changed, 3 insertions(+), 2 deletions(-)
drivers/net/wireless/rt2x00/rt2x00mac.c +1 -1
index 8efab39..4ccf238 100644
@@ -113,7 +113,7 @@ void rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
         * due to possible race conditions in mac80211.
         */
        if (!test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags))
-               goto exit_fail;
+               goto exit_free_skb;
 
        /*
         * Use the ATIM queue if appropriate and present.
@@ -127,7 +127,7 @@ void rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
                ERROR(rt2x00dev,

                     "Attempt to send packet over invalid queue %d.\n" "Please file bug report to %s.\n", qid, DRV_PROJECT);
-               goto exit_fail;
+               goto exit_free_skb;
       }

       /*

drivers/net/wireless/rt2x00/rt2x00mac.c +0 -0
@@ -159,6 +159,7 @@ void rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
 

 exit_fail:
       rt2x00queue_pause_queue(queue);
+ exit_free_skb:
       dev_kfree_skb_any(skb);
 }
 EXPORT_SYMBOL_GPL(rt2x00mac_tx);
--
1.7.1

Signature · 2 lines
---
Gertjan