Skip to content

Commit

Permalink
usb: hso: remove bogus check for EINPROGRESS
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
oneukum authored and davem330 committed Aug 6, 2020
1 parent 11c5f6d commit abaf00f
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 @@ -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 */
Expand Down

0 comments on commit abaf00f

Please sign in to comment.