diff options
author | Oliver Neukum <oneukum@suse.com> | 2024-10-10 15:19:14 +0200 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2024-10-15 11:37:25 +0200 |
commit | b62f4c186c70aa235fef2da68d07325d85ca3ade (patch) | |
tree | ff23c82df9d68b693a82b8d1f991aa5829177422 /drivers/net | |
parent | net/smc: Fix memory leak when using percpu refs (diff) | |
download | linux-b62f4c186c70aa235fef2da68d07325d85ca3ade.tar.xz linux-b62f4c186c70aa235fef2da68d07325d85ca3ade.zip |
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 <oneukum@suse.com>
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Link: https://patch.msgid.link/20241010131934.1499695-1-oneukum@suse.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/usb/usbnet.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c index 2506aa8c603e..ee1b5fd7b491 100644 --- a/drivers/net/usb/usbnet.c +++ b/drivers/net/usb/usbnet.c @@ -1870,6 +1870,7 @@ out1: * may trigger an error resubmitting itself and, worse, * schedule a timer. So we kill it all just in case. */ + usbnet_mark_going_away(dev); cancel_work_sync(&dev->kevent); del_timer_sync(&dev->delay); free_netdev(net); |