linux_dsm_epyc7002/drivers/net/usb
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
..
asix_common.c usb: Fix FSF address in file headers 2013-12-06 12:37:55 -05:00
asix_devices.c net: USB: Deletion of unnecessary checks before the function call "kfree" 2014-11-21 15:16:10 -05:00
asix.h drivers/net: delete non-required instances of include <linux/init.h> 2014-01-16 11:53:26 -08:00
ax88172a.c usb: Fix FSF address in file headers 2013-12-06 12:37:55 -05:00
ax88179_178a.c ax88179_178a: fix bonding failure 2014-10-20 00:53:30 -04:00
catc.c net: get rid of SET_ETHTOOL_OPS 2014-05-13 17:43:20 -04:00
cdc_eem.c drivers/net: delete non-required instances of include <linux/init.h> 2014-01-16 11:53:26 -08:00
cdc_ether.c cdc-ether: implement MULTICAST flag on the device 2014-11-07 15:17:45 -05:00
cdc_mbim.c vlan: kill vlan_put_tag helper 2014-11-21 14:20:17 -05:00
cdc_ncm.c net: cdc_ncm: allow tuning min_tx_pkt 2014-06-02 16:01:31 -07:00
cdc_subset.c cdc_subset: deal with a device that needs reset for timeout 2014-08-02 15:44:18 -07:00
cdc-phonet.c phonet: Replace calls to __skb_alloc_page with __dev_alloc_page 2014-11-12 00:00:14 -05:00
cx82310_eth.c drivers/net: delete non-required instances of include <linux/init.h> 2014-01-16 11:53:26 -08:00
dm9601.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-01-18 00:55:41 -08:00
gl620a.c usbnet: remove generic hard_header_len check 2014-02-17 14:35:46 -05:00
hso.c hso: update serial_table in usb disconnect method 2015-02-01 12:33:27 -08:00
huawei_cdc_ncm.c net: huawei_cdc_ncm: add "subclass 3" devices 2014-07-17 16:49:50 -07:00
int51x1.c usb: Fix FSF address in file headers 2013-12-06 12:37:55 -05:00
ipheth.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-06-03 23:32:12 -07:00
kalmia.c drivers/net: delete non-required instances of include <linux/init.h> 2014-01-16 11:53:26 -08:00
kaweth.c usb/kaweth: use GFP_ATOMIC under spin_lock in usb_start_wait_urb() 2015-01-12 16:42:49 -05:00
Kconfig net: fix USB network driver config option. 2014-08-06 16:00:20 -07:00
lg-vl600.c lg-vl600: Convert uses of __constant_<foo> to <foo> 2014-03-12 15:28:06 -04:00
Makefile r8152: disable the ECM mode 2014-03-05 20:40:24 -05:00
mcs7830.c usbnet: remove generic hard_header_len check 2014-02-17 14:35:46 -05:00
net1080.c usbnet: remove generic hard_header_len check 2014-02-17 14:35:46 -05:00
pegasus.c net: get rid of SET_ETHTOOL_OPS 2014-05-13 17:43:20 -04:00
pegasus.h drivers: net: usb: pegasus: fix control urb submission 2013-04-29 13:57:50 -04:00
plusb.c drivers/net: delete non-required instances of include <linux/init.h> 2014-01-16 11:53:26 -08:00
qmi_wwan.c qmi_wwan: Set random MAC on devices with buggy fw 2015-01-02 16:41:47 -05:00
r8152.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-01-27 16:59:56 -08:00
rndis_host.c usbnet: remove generic hard_header_len check 2014-02-17 14:35:46 -05:00
rtl8150.c usbnet: rtl8150: remove unused variable 2014-11-19 15:17:11 -05:00
sierra_net.c usb: Fix FSF address in file headers 2013-12-06 12:37:55 -05:00
smsc75xx.c usbnet: remove generic hard_header_len check 2014-02-17 14:35:46 -05:00
smsc75xx.h usb: Fix FSF address in file headers 2013-12-06 12:37:55 -05:00
smsc95xx.c usbnet: smsc95xx: dereferencing NULL pointer 2014-11-11 16:24:08 -05:00
smsc95xx.h usb: Fix FSF address in file headers 2013-12-06 12:37:55 -05:00
sr9700.c drivers/net: delete non-required instances of include <linux/init.h> 2014-01-16 11:53:26 -08:00
sr9700.h USB2NET : SR9700 : One chip USB 1.1 USB2NET SR9700Device Driver Support 2013-09-03 22:26:03 -04:00
sr9800.c usbnet: remove generic hard_header_len check 2014-02-17 14:35:46 -05:00
sr9800.h USB2NET : SR9800 : One chip USB2.0 USB2NET SR9800 Device Driver Support 2014-02-10 16:53:06 -08:00
usbnet.c usbnet: re-use native hex2bin() 2015-01-25 00:09:41 -08:00
zaurus.c drivers/net: delete non-required instances of include <linux/init.h> 2014-01-16 11:53:26 -08:00