]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
ar9170usb: fix panic triggered by undersized rxstream buffer
authorChristian Lamparter <chunkeey@googlemail.com>
Tue, 23 Mar 2010 20:51:14 +0000 (21:51 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 5 Jul 2010 18:15:37 +0000 (11:15 -0700)
commit 879999cec9489f8942ebce3ec1b5f23ef948dda7 upstream.

While ar9170's USB transport packet size is currently set to 8KiB,
the PHY is capable of receiving AMPDUs with up to 64KiB.
Such a large frame will be split over several rx URBs and
exceed the previously allocated space for rx stream reconstruction.

This patch increases the buffer size to 64KiB which is
in fact the phy & rx stream designed size limit.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=15591
Reported-by: Christian Mehlis <mehlis@inf.fu-berlin.de>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/net/wireless/ath/ar9170/hw.h
drivers/net/wireless/ath/ar9170/main.c

index 701ddb7d84004766a9f9e7e37ae796ecc709f39b..5e7e1bd0e48480759920c5b319218f4dfe0cf01c 100644 (file)
@@ -424,5 +424,6 @@ enum ar9170_txq {
 
 #define AR9170_TXQ_DEPTH       32
 #define AR9170_TX_MAX_PENDING  128
+#define AR9170_RX_STREAM_MAX_SIZE 65535
 
 #endif /* __AR9170_HW_H */
index f9d6db8d013ec9bea5545dea749f5ba4013d4786..9ea98459d4b30afe41d219d5f595ad353b71c7f1 100644 (file)
@@ -2538,7 +2538,7 @@ void *ar9170_alloc(size_t priv_size)
         * tends to split the streams into seperate rx descriptors.
         */
 
-       skb = __dev_alloc_skb(AR9170_MAX_RX_BUFFER_SIZE, GFP_KERNEL);
+       skb = __dev_alloc_skb(AR9170_RX_STREAM_MAX_SIZE, GFP_KERNEL);
        if (!skb)
                goto err_nomem;