lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <0ffe756fb77249c6bcc751c423590827@seaexchmbx01.olympus.F5Net.com>
Date:	Thu, 23 Jun 2016 18:43:35 +0000
From:	Soohoon Lee <Soohoon.Lee@...com>
To:	"oneukum@...e.com" <oneukum@...e.com>
CC:	"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: [ PATCH] usbnet.c mtu change needs to stop RX


When MTU is changed unlink_urbs() flushes RX Q but mean while usbnet_bh() can fill up the Q at the same time.
Depends on which HCD is down there unlink takes long time then the flush never ends.


diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index 61ba464..e03e3e6 100644
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
@@ -708,6 +708,7 @@ static int unlink_urbs (struct usbnet *dev, struct sk_buff_head *q)
        int                     count = 0;
 
        spin_lock_irqsave (&q->lock, flags);
+       usbnet_pause_rx(dev);
        while (!skb_queue_empty(q)) {
                struct skb_data         *entry;
                struct urb              *urb;
@@ -742,6 +743,7 @@ found:
                usb_put_urb(urb);
                spin_lock_irqsave(&q->lock, flags);
        }
+       usbnet_resume_rx(dev);
        spin_unlock_irqrestore (&q->lock, flags);
        return count;
 }
@@ -1509,6 +1511,7 @@ static void usbnet_bh (unsigned long param)
                   netif_device_present (dev->net) &&
                   netif_carrier_ok(dev->net) &&
                   !timer_pending (&dev->delay) &&
+                  !test_bit (EVENT_RX_PAUSED, &dev->flags) &&
                   !test_bit (EVENT_RX_HALT, &dev->flags)) {
                int     temp = dev->rxq.qlen;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ