net: startup race in hso driver
authorOliver Neukum <oliver@neukum.org>
Thu, 18 Dec 2008 03:57:35 +0000 (03:57 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 23 Dec 2008 03:54:00 +0000 (19:54 -0800)
The flag marking a device running must be set before the URBs for
recption are submitted or they may complete too early and fail to resubmit.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/hso.c

index c5c1aeae94fed2d90e905f2988d10a67880972c5..198ce3cf378ae2b884ce16b21a5fa1ba7a028d5c 100644 (file)
@@ -663,10 +663,9 @@ static int hso_net_open(struct net_device *net)
        odev->rx_buf_missing = sizeof(struct iphdr);
        spin_unlock_irqrestore(&odev->net_lock, flags);
 
-       hso_start_net_device(odev->parent);
-
        /* We are up and running. */
        set_bit(HSO_NET_RUNNING, &odev->flags);
+       hso_start_net_device(odev->parent);
 
        /* Tell the kernel we are ready to start receiving from it */
        netif_start_queue(net);