Skip to content

Commit b62f4c1

Browse files
oneukumPaolo Abeni
authored andcommitted
net: usb: usbnet: fix race in probe failure
The same bug as in the disconnect code path also exists in the case of a failure late during the probe process. The flag must also be set. Signed-off-by: Oliver Neukum <[email protected]> Fixes: 1da177e ("Linux-2.6.12-rc2") Link: https://patch.msgid.link/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
1 parent 25c12b4 commit b62f4c1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/net/usb/usbnet.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1870,6 +1870,7 @@ usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod)
18701870
* may trigger an error resubmitting itself and, worse,
18711871
* schedule a timer. So we kill it all just in case.
18721872
*/
1873+
usbnet_mark_going_away(dev);
18731874
cancel_work_sync(&dev->kevent);
18741875
del_timer_sync(&dev->delay);
18751876
free_netdev(net);

0 commit comments

Comments
 (0)