linux/drivers/net
Olivier Sobrie 301d3b7e10 hso: update serial_table in usb disconnect method
The serial_table is used to map the minor number of the usb serial device
to its associated context. The table is updated in the probe method and
in hso_serial_ref_free() which is called either from the tty cleanup
method or from the usb disconnect method.
This patch ensures that the serial_table is updated in the disconnect
method and no more from the cleanup method to avoid the following
potential race condition.

 - hso_disconnect() is called for usb interface "x". Because the serial
   port was open and because the cleanup method of the tty_port hasn't
   been called yet, hso_serial_ref_free() is not run.
 - hso_probe() is called and fails for a new hso serial usb interface
   "y". The function hso_free_interface() is called and iterates
   over the element of serial_table to find the device associated to
   the usb interface context.
   If the usb interface context of usb interface "y" has been created
   at the same place as for usb interface "x", then the cleanup
   functions are called for usb interfaces "x" and "y" and
   hso_serial_ref_free() is called for both interfaces.
 - release_tty() is called for serial port linked to usb interface "x"
   and possibly crash because the tty_port structure contained in the
   hso_device structure has been freed.

Signed-off-by: Olivier Sobrie <olivier@sobrie.be>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-01 12:33:27 -08:00
..
appletalk
arcnet
bonding bonding: cleanup and remove dead code 2015-01-27 17:09:04 -08:00
caif caif: Fix napi poll list corruption 2014-12-22 16:34:39 -05:00
can can: peak_usb: add support for PEAK new CANFD USB adapters 2015-01-28 14:47:06 +01:00
cris
dsa net: dsa/mv88e6352: make mv88e6352_wait generic 2015-01-27 00:05:56 -08:00
ethernet drivers: net: cpsw: make cpsw_ale.c a module to allow re-use on Keystone 2015-01-31 17:33:07 -08:00
fddi net: fddi: skfp: smt.c: Remove unused function 2015-01-02 16:36:07 -05:00
hamradio hamradio: 6pack: remove unnecessary check 2014-11-03 15:34:31 -05:00
hippi
hyperv hyperv: match wait_for_completion_timeout return type 2015-01-27 17:00:20 -08:00
ieee802154 at86rf230: Constify struct regmap_config 2015-01-05 16:30:50 -05:00
ipvlan net: mark some potential candidates __read_mostly 2015-01-30 17:58:39 -08:00
irda irda: vlsi_ir: Replace timeval with ktime_t 2015-01-11 21:39:40 -05:00
phy net: phy: Invalidate LP advertising flags when restarting or disabling AN 2015-01-27 00:27:08 -08:00
plip
ppp ppp_read(): switch to skb_copy_datagram_iter() 2014-12-09 16:29:10 -05:00
slip
team Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-01-15 00:53:17 -05:00
usb hso: update serial_table in usb disconnect method 2015-02-01 12:33:27 -08:00
vmxnet3 Driver: Vmxnet3: Fix ethtool -S to return correct rx queue stats 2015-01-16 00:30:05 -05:00
wan
wimax
wireless Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-01-27 16:59:56 -08:00
xen-netback xen-netback: always fully coalesce guest Rx packets 2015-01-23 18:01:58 -08:00
dummy.c dummy: use MODULE_VERSION 2014-12-09 21:51:06 -05:00
eql.c
ifb.c
Kconfig ipvlan: ipvlan depends on INET and IPV6 2014-11-29 20:53:05 -08:00
LICENSE.SRC
loopback.c
macvlan.c macvlan: advertise link netns via netlink 2015-01-23 17:51:15 -08:00
macvtap.c net: rename vlan_tx_* helpers since "tx" is misleading there 2015-01-13 17:51:08 -05:00
Makefile ipvlan: Initial check-in of the IPVLAN driver. 2014-11-24 15:29:18 -05:00
mdio.c
mii.c mii: Handle link state changes for forced modes in mii_check_media() 2015-01-19 15:43:42 -05:00
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
Space.c
sungem_phy.c
tun.c net: rename vlan_tx_* helpers since "tx" is misleading there 2015-01-13 17:51:08 -05:00
veth.c veth: advertise link netns via netlink 2015-01-23 17:51:15 -08:00
virtio_net.c virtio_net: add software timestamp support 2015-01-22 18:10:16 -08:00
vxlan.c vxlan: advertise link netns in fdb messages 2015-01-27 17:11:07 -08:00
xen-netfront.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-01-15 00:53:17 -05:00