]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
usbnet: fix cyclical race on disconnect with work queue
authorOliver Neukum <oneukum@suse.com>
Thu, 19 Sep 2024 12:33:42 +0000 (14:33 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Oct 2024 14:33:32 +0000 (16:33 +0200)
commitca124236cd14e61610f56df9a8f81376a1ffe660
treef631516ead1ee66bdb3e5c14f36c2d0c242b0316
parent5898a987980345e7433bc736f7dd1b1bdb73db51
usbnet: fix cyclical race on disconnect with work queue

commit 04e906839a053f092ef53f4fb2d610983412b904 upstream.

The work can submit URBs and the URBs can schedule the work.
This cycle needs to be broken, when a device is to be stopped.
Use a flag to do so.
This is a design issue as old as the driver.

Signed-off-by: Oliver Neukum <oneukum@suse.com>
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
CC: stable@vger.kernel.org
Link: https://patch.msgid.link/20240919123525.688065-1-oneukum@suse.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/usb/usbnet.c
include/linux/usb/usbnet.h