From: Jeff Westfahl Date: Thu, 29 May 2014 06:49:41 +0000 (+0300) Subject: usb: gadget: u_ether: synchronize with transmit when stopping queue X-Git-Tag: omap-for-v3.16/fixes-rc4~20^2~9^2~7 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a9232076374334ca2bc2a448dfde96d38a54349a;p=pandora-kernel.git 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: Jeff Westfahl Tested-by: Jaeden Amero Signed-off-by: Felipe Balbi --- Reading git-diff-tree failed