diff options
author | Oliver Neukum <oneukum@suse.com> | 2020-08-05 14:07:09 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-08-05 17:43:39 -0700 |
commit | abaf00ff04625275a40e407fc8da04948ae4f95b (patch) | |
tree | 2b4aa367b7682896b917857054c52e037b90a2dc /drivers/net/usb | |
parent | 11c5f6d2f2a8f34f64dfcdec4090d2c17539c2c3 (diff) | |
download | linux-abaf00ff04625275a40e407fc8da04948ae4f95b.tar.bz2 |
usb: hso: remove bogus check for EINPROGRESS
This check an inherent race. It opens a race where
an error code has already been set or cleared yet
the URB has not been given back. We cannot do
such an optimization and must unlink unconditionally.
Signed-off-by: Oliver Neukum <oneukum@suse.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/usb')
-rw-r--r-- | drivers/net/usb/hso.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c index 5762876e3105..2bb28db89432 100644 --- a/drivers/net/usb/hso.c +++ b/drivers/net/usb/hso.c @@ -831,8 +831,7 @@ static void hso_net_tx_timeout(struct net_device *net, unsigned int txqueue) dev_warn(&net->dev, "Tx timed out.\n"); /* Tear the waiting frame off the list */ - if (odev->mux_bulk_tx_urb && - (odev->mux_bulk_tx_urb->status == -EINPROGRESS)) + if (odev->mux_bulk_tx_urb) usb_unlink_urb(odev->mux_bulk_tx_urb); /* Update statistics */ |