Skip to content

Commit

Permalink
usbnet: ipheth: race between ipheth_close and error handling
Browse files Browse the repository at this point in the history
ipheth_sndbulk_callback() can submit carrier_work
as a part of its error handling. That means that
the driver must make sure that the work is cancelled
after it has made sure that no more URB can terminate
with an error condition.

Hence the order of actions in ipheth_close() needs
to be inverted.

Signed-off-by: Oliver Neukum <[email protected]>
Signed-off-by: Foster Snowhill <[email protected]>
Tested-by: Georgi Valkov <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
oneukum authored and davem330 committed Aug 9, 2024
1 parent ee9a43b commit e5876b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/usb/ipheth.c
Original file line number Diff line number Diff line change
Expand Up @@ -475,8 +475,8 @@ static int ipheth_close(struct net_device *net)
{
struct ipheth_device *dev = netdev_priv(net);

cancel_delayed_work_sync(&dev->carrier_work);
netif_stop_queue(net);
cancel_delayed_work_sync(&dev->carrier_work);
return 0;
}

Expand Down

0 comments on commit e5876b0

Please sign in to comment.