Skip to content

Commit

Permalink
net: startup race in hso driver
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Oliver Neukum authored and David S. Miller committed Dec 23, 2008
1 parent 05a8c1c commit 889bd9b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/net/usb/hso.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 889bd9b

Please sign in to comment.