kernel-fxtec-pro1x/drivers/net/usb
Ming Lei 5b6e9bcdeb usbnet: fix skb traversing races during unlink(v2)
Commit 4231d47e6fe69f061f96c98c30eaf9fb4c14b96d(net/usbnet: avoid
recursive locking in usbnet_stop()) fixes the recursive locking
problem by releasing the skb queue lock before unlink, but may
cause skb traversing races:
	- after URB is unlinked and the queue lock is released,
	the refered skb and skb->next may be moved to done queue,
	even be released
	- in skb_queue_walk_safe, the next skb is still obtained
	by next pointer of the last skb
	- so maybe trigger oops or other problems

This patch extends the usage of entry->state to describe 'start_unlink'
state, so always holding the queue(rx/tx) lock to change the state if
the referd skb is in rx or tx queue because we need to know if the
refered urb has been started unlinking in unlink_urbs.

The other part of this patch is based on Huajun's patch:
always traverse from head of the tx/rx queue to get skb which is
to be unlinked but not been started unlinking.

Signed-off-by: Huajun Li <huajun.li.lee@gmail.com>
Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Cc: Oliver Neukum <oneukum@suse.de>
Cc: stable@kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-15 13:41:42 -04:00
..
asix.c asix: Fix tx transfer padding for full-speed USB 2012-04-24 04:11:34 -04:00
catc.c USB: convert drivers/net/* to use module_usb_driver() 2011-11-18 09:44:20 -08:00
cdc-phonet.c cdc-phonet: fix skb truesize underestimation 2012-03-27 22:50:55 -04:00
cdc_eem.c net: usb: cdc_eem: fix mtu 2012-04-01 23:32:35 -04:00
cdc_ether.c cdc_ether: Ignore bogus union descriptor for RNDIS devices 2012-05-06 13:11:55 -04:00
cdc_ncm.c cdc_ncm: avoid discarding datagrams in rx path 2012-03-16 02:08:36 -07:00
cdc_subset.c USB: convert drivers/net/* to use module_usb_driver() 2011-11-18 09:44:20 -08:00
cx82310_eth.c USB: convert drivers/net/* to use module_usb_driver() 2011-11-18 09:44:20 -08:00
dm9601.c USB: convert drivers/net/* to use module_usb_driver() 2011-11-18 09:44:20 -08:00
gl620a.c USB: convert drivers/net/* to use module_usb_driver() 2011-11-18 09:44:20 -08:00
hso.c tty and serial merge for 3.4-rc1 2012-03-20 11:24:39 -07:00
int51x1.c USB: convert drivers/net/* to use module_usb_driver() 2011-11-18 09:44:20 -08:00
ipheth.c ipheth: Add iPhone 4S 2012-02-15 14:50:16 -05:00
kalmia.c USB: convert drivers/net/* to use module_usb_driver() 2011-11-18 09:44:20 -08:00
kaweth.c usb/kaweth: print MAC via printk format specifier 2012-02-24 15:41:00 -05:00
Kconfig net: qmi_wwan: fix build error due to cdc-wdm dependecy 2012-03-19 18:17:18 -04:00
lg-vl600.c Merge branch 'driver-core-next' into Linux 3.2 2012-01-06 11:42:52 -08:00
Makefile net: usb: qmi_wwan: New driver for Huawei QMI based WWAN devices 2012-03-09 13:09:17 -08:00
mcs7830.c mcs7830: unify return value of .ndo_set_mac_address if address is invalid 2012-02-23 17:03:20 -05:00
net1080.c USB: convert drivers/net/* to use module_usb_driver() 2011-11-18 09:44:20 -08:00
pegasus.c drivers/net: Remove alloc_etherdev error messages 2012-01-31 16:20:48 -05:00
pegasus.h usb: pegasus: fixed coding style issues 2010-06-30 10:26:16 -07:00
plusb.c USB: convert drivers/net/* to use module_usb_driver() 2011-11-18 09:44:20 -08:00
qmi_wwan.c net: qmi_wwan: support Sierra Wireless MC77xx devices in QMI mode 2012-04-19 15:26:42 -04:00
rndis_host.c USB: convert drivers/net/* to use module_usb_driver() 2011-11-18 09:44:20 -08:00
rtl8150.c usb/rtl8150 : Remove duplicated definitions 2012-04-01 23:20:37 -04:00
sierra_net.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-01-09 14:46:52 -08:00
smsc75xx.c smsc75xx: enable mac to detect speed/duplex from phy 2012-04-30 21:52:42 -04:00
smsc75xx.h smsc75xx: SMSC LAN75xx USB gigabit ethernet adapter driver 2010-03-16 14:15:42 -07:00
smsc95xx.c smsc95xx: mark link down on startup and let PHY interrupt deal with carrier changes 2012-04-26 05:56:03 -04:00
smsc95xx.h
usbnet.c usbnet: fix skb traversing races during unlink(v2) 2012-05-15 13:41:42 -04:00
zaurus.c USB: Add Motorola Rokr E6 Id to the USBNet driver "zaurus" 2012-03-27 22:39:46 -04:00