Skip to content
Commit a9232076 authored by Jeff Westfahl's avatar Jeff Westfahl Committed by Felipe Balbi
Browse files

usb: gadget: u_ether: synchronize with transmit when stopping queue



When disconnecting, it's possible that another thread has already made it
into eth_start_xmit before we call netif_stop_queue. This can lead to a
crash as eth_start_xmit tries to use resources that gether_disconnect is
freeing. Use netif_tx_lock/unlock around netif_stop_queue to ensure no
threads are executing during the remainder of gether_disconnect.

Signed-off-by: default avatarJeff Westfahl <jeff.westfahl@ni.com>
Tested-by: default avatarJaeden Amero <jaeden.amero@ni.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent 02dae36a
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