1
0
Fork 0
alistair23-linux/drivers/net/usb
Bjørn Mork 6c730080e6 net: qmi_wwan: should hold RTNL while changing netdev type
The notifier calls were thrown in as a last-minute fix for an
imagined "this device could be part of a bridge" problem. That
revealed a certain lack of locking.  Not to mention testing...

Avoid this splat:

RTNL: assertion failed at net/core/dev.c (1639)
CPU: 0 PID: 4293 Comm: bash Not tainted 4.4.0-rc3+ #358
Hardware name: LENOVO 2776LEG/2776LEG, BIOS 6EET55WW (3.15 ) 12/19/2011
 0000000000000000 ffff8800ad253d60 ffffffff8122f7cf ffff8800ad253d98
 ffff8800ad253d88 ffffffff813833ab 0000000000000002 ffff880230f48560
 ffff880230a12900 ffff8800ad253da0 ffffffff813833da 0000000000000002
Call Trace:
 [<ffffffff8122f7cf>] dump_stack+0x4b/0x63
 [<ffffffff813833ab>] call_netdevice_notifiers_info+0x3d/0x59
 [<ffffffff813833da>] call_netdevice_notifiers+0x13/0x15
 [<ffffffffa09be227>] raw_ip_store+0x81/0x193 [qmi_wwan]
 [<ffffffff8131e149>] dev_attr_store+0x20/0x22
 [<ffffffff811d858b>] sysfs_kf_write+0x49/0x50
 [<ffffffff811d8027>] kernfs_fop_write+0x10a/0x151
 [<ffffffff8117249a>] __vfs_write+0x26/0xa5
 [<ffffffff81085ed4>] ? percpu_down_read+0x53/0x7f
 [<ffffffff81174c9e>] ? __sb_start_write+0x5f/0xb0
 [<ffffffff81174c9e>] ? __sb_start_write+0x5f/0xb0
 [<ffffffff81172c37>] vfs_write+0xa3/0xe7
 [<ffffffff811734ad>] SyS_write+0x50/0x7e
 [<ffffffff8145c517>] entry_SYSCALL_64_fastpath+0x12/0x6f

Fixes: 32f7adf633 ("net: qmi_wwan: support "raw IP" mode")
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-12-06 22:27:35 -05:00
..
Kconfig Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-10-20 06:08:27 -07:00
Makefile usbnet: New driver for QinHeng CH9200 devices 2015-09-21 16:16:16 -07:00
asix.h asix: Rename remaining and size for clarity 2015-10-05 06:58:38 -07:00
asix_common.c drivers/net: get rid of unnecessary initializations in .get_drvinfo() 2015-10-16 00:24:10 -07:00
asix_devices.c net: asix: add support for the Billionton GUSB2AM-1G-B USB adapter 2015-10-18 19:36:04 -07: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: usb: Use eth_<foo>_addr instead of memset 2015-03-03 17:01:36 -05:00
cdc-phonet.c cdc-phonet: use common parser 2015-09-15 12:43:49 -07: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 net: usb: cdc_ether: add Dell DW5580 as a mobile broadband adapter 2015-11-16 14:58:39 -05:00
cdc_mbim.c ipv6: remove unused neigh parameter from ndisc functions 2015-09-24 12:26:08 -07:00
cdc_ncm.c net: cdc_ncm: fix NULL pointer deref in cdc_ncm_bind_common 2015-11-24 14:26:16 -05:00
cdc_subset.c cdc_subset: deal with a device that needs reset for timeout 2014-08-02 15:44:18 -07:00
ch9200.c ch9200: Convert to use module_usb_driver 2015-09-22 17:34:57 -07:00
cx82310_eth.c cx82310_eth: fix semicolon.cocci warnings 2015-03-24 14:56:02 -04:00
dm9601.c drivers/net: get rid of unnecessary initializations in .get_drvinfo() 2015-10-16 00:24:10 -07:00
gl620a.c usbnet: remove generic hard_header_len check 2014-02-17 14:35:46 -05:00
hso.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-03-03 21:16:48 -05:00
huawei_cdc_ncm.c cdc_ncm: Add support for moving NDP to end of NCM frame 2015-07-09 14:58:31 -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 kaweth: remove ifdefed out call to dma_supported 2015-11-10 16:32:11 -08:00
lan78xx.c lan78xx: Return 0 when lan78xx_suspend() has no error. 2015-09-28 22:28:53 -07:00
lan78xx.h lan78xx: Remove not defined MAC_CR_GMII_EN_ bit from MAC_CR. 2015-09-17 22:15:37 -07:00
lg-vl600.c net: usb: Use eth_<foo>_addr instead of memset 2015-03-03 17:01:36 -05:00
mcs7830.c drivers/net: get rid of unnecessary initializations in .get_drvinfo() 2015-10-16 00:24:10 -07: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 usb: plusb: Add support for National Instruments host-to-host cable 2015-02-20 15:12:48 -05:00
qmi_wwan.c net: qmi_wwan: should hold RTNL while changing netdev type 2015-12-06 22:27:35 -05:00
r8152.c r8152: fix the runtime suspend issues 2015-09-09 20:27:54 -07: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 invalid check 2015-09-22 16:14:32 -07:00
smsc75xx.h usb: Fix FSF address in file headers 2013-12-06 12:37:55 -05:00
smsc95xx.c usbnet: remove invalid check 2015-09-22 16:14:32 -07:00
smsc95xx.h usb: Fix FSF address in file headers 2013-12-06 12:37:55 -05:00
sr9700.c net: usb: sr9700: Use 'SR_' prefix for the common register macros 2015-02-04 13:53:02 -08:00
sr9700.h net: usb: sr9700: Use 'SR_' prefix for the common register macros 2015-02-04 13:53:02 -08:00
sr9800.c drivers/net: get rid of unnecessary initializations in .get_drvinfo() 2015-10-16 00:24:10 -07: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: allow mini-drivers to consume L2 headers 2015-12-04 16:56:23 -05:00
zaurus.c drivers/net: delete non-required instances of include <linux/init.h> 2014-01-16 11:53:26 -08:00