mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-03 01:36:52 +09:00
rt2x00: fix usage of NULL queue
commit00898a4726upstream. We may call rt2x00queue_pause_queue(queue) with queue == NULL. Bug was introduced by commit62fe778412"rt2x00: Fix stuck queue in tx failure case" . Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Acked-by: Ivo van Doorn <IvDoorn@gmail.com> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
e10eea625f
commit
07e1a60a73
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user