Commit e5876b08 authored by Oliver Neukum's avatar Oliver Neukum Committed by David S. Miller

usbnet: ipheth: race between ipheth_close and error handling

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: default avatarOliver Neukum <oneukum@suse.com>
Signed-off-by: default avatarFoster Snowhill <forst@pen.gy>
Tested-by: default avatarGeorgi Valkov <gvalkov@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ee9a43b7
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment