linux-stable/drivers/net/usb
Guenter Roeck ca0a75316d r8152: Fix error path in open function
If usb_submit_urb() called from the open function fails, the following
crash may be observed.

r8152 8-1:1.0 eth0: intr_urb submit failed: -19
...
r8152 8-1:1.0 eth0: v1.08.3
Unable to handle kernel paging request at virtual address 6b6b6b6b6b6b6b7b
pgd = ffffffc0e7305000
[6b6b6b6b6b6b6b7b] *pgd=0000000000000000, *pud=0000000000000000
Internal error: Oops: 96000004 [#1] PREEMPT SMP
...
PC is at notifier_chain_register+0x2c/0x58
LR is at blocking_notifier_chain_register+0x54/0x70
...
Call trace:
[<ffffffc0002407f8>] notifier_chain_register+0x2c/0x58
[<ffffffc000240bdc>] blocking_notifier_chain_register+0x54/0x70
[<ffffffc00026991c>] register_pm_notifier+0x24/0x2c
[<ffffffbffc183200>] rtl8152_open+0x3dc/0x3f8 [r8152]
[<ffffffc000808000>] __dev_open+0xac/0x104
[<ffffffc0008082f8>] __dev_change_flags+0xb0/0x148
[<ffffffc0008083c4>] dev_change_flags+0x34/0x70
[<ffffffc000818344>] do_setlink+0x2c8/0x888
[<ffffffc0008199d4>] rtnl_newlink+0x328/0x644
[<ffffffc000819e98>] rtnetlink_rcv_msg+0x1a8/0x1d4
[<ffffffc0008373c8>] netlink_rcv_skb+0x68/0xd0
[<ffffffc000817990>] rtnetlink_rcv+0x2c/0x3c
[<ffffffc000836d1c>] netlink_unicast+0x16c/0x234
[<ffffffc00083720c>] netlink_sendmsg+0x340/0x364
[<ffffffc0007e85d0>] sock_sendmsg+0x48/0x60
[<ffffffc0007e9c30>] SyS_sendto+0xe0/0x120
[<ffffffc0007e9cb0>] SyS_send+0x40/0x4c
[<ffffffc000203e34>] el0_svc_naked+0x24/0x28

Clean up error handling to avoid registering the notifier if the open
function is going to fail.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-11-13 12:03:20 -05:00
..
asix.h net: asix: Add in_pm parameter 2016-08-31 21:07:05 -07:00
asix_common.c net: asix: Avoid looping when the device does not respond 2016-10-14 16:06:54 -04:00
asix_devices.c net: asix: autoneg will set WRITE_MEDIUM reg 2016-08-31 21:07:06 -07:00
ax88172a.c net: asix: Add in_pm parameter 2016-08-31 21:07:05 -07:00
ax88179_178a.c Net Driver: Add Cypress GX3 VID=04b4 PID=3610. 2016-11-09 21:45:34 -05:00
catc.c treewide: replace dev->trans_start update with helper 2016-05-04 14:16:49 -04:00
cdc-phonet.c
cdc_eem.c
cdc_ether.c cdc_ether: Improve ZTE MF823/831/910 handling 2016-07-24 22:16:03 -07:00
cdc_mbim.c
cdc_ncm.c cdc_ncm: workaround for EM7455 "silent" data interface 2016-07-04 16:12:03 -07:00
cdc_subset.c
ch9200.c net: usb: ch9200: use kmemdup 2016-05-20 19:50:07 -04:00
cx82310_eth.c
dm9601.c
gl620a.c
hso.c hso: Convert printk to pr_<level> 2016-09-06 13:29:51 -07:00
huawei_cdc_ncm.c
int51x1.c
ipheth.c
kalmia.c kalmia: avoid potential uninitialized variable use 2016-10-27 16:27:34 -04:00
kaweth.c kaweth: remove obsolete debugging statements 2016-09-07 17:45:31 -07:00
Kconfig
lan78xx.c lan78xx: mark symbols static where possible 2016-09-06 15:58:59 -07:00
lan78xx.h
lg-vl600.c
Makefile
mcs7830.c
net1080.c
pegasus.c net: pegasus: Remove deprecated create_singlethread_workqueue 2016-09-01 16:42:25 -07:00
pegasus.h
plusb.c
qmi_wwan.c qmi_wwan: add support for Quectel EC21 and EC25 2016-10-13 10:05:06 -04:00
r8152.c r8152: Fix error path in open function 2016-11-13 12:03:20 -05:00
rndis_host.c rndis_host: Set valid random MAC on buggy devices 2016-07-16 20:03:04 -07:00
rtl8150.c treewide: replace dev->trans_start update with helper 2016-05-04 14:16:49 -04:00
sierra_net.c
smsc75xx.c usbnet/smsc75xx: silence uninitialized variable warning 2016-05-04 16:58:56 -04:00
smsc75xx.h
smsc95xx.c smsc95xx: Add mdix control via ethtool 2016-09-06 13:28:10 -07:00
smsc95xx.h smsc95xx: Add register define 2016-09-06 13:28:10 -07:00
sr9700.c
sr9700.h
sr9800.c
sr9800.h
usbnet.c net: usb: usbnet: don't print error when allocating urb fails 2016-08-13 14:53:40 -07:00
zaurus.c