android_kernel_samsung_msm8976/drivers/net
Cong Wang 71ee59f2d8 tun: call dev_get_valid_name() before register_netdevice()
commit 0ad646c81b2182f7fa67ec0c8c825e0ee165696d upstream.

register_netdevice() could fail early when we have an invalid
dev name, in which case ->ndo_uninit() is not called. For tun
device, this is a problem because a timer etc. are already
initialized and it expects ->ndo_uninit() to clean them up.

We could move these initializations into a ->ndo_init() so
that register_netdevice() knows better, however this is still
complicated due to the logic in tun_detach().

Therefore, I choose to just call dev_get_valid_name() before
register_netdevice(), which is quicker and much easier to audit.
And for this specific case, it is already enough.

Fixes: 96442e4242 ("tuntap: choose the txq based on rxq")
Change-Id: Ibc9f82d0b26a34c56ccc0a076de37db534823a48
Reported-by: Dmitry Alexeev <avekceeb@gmail.com>
Cc: Jason Wang <jasowang@redhat.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[bwh: Backported to 3.16: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
2019-07-27 21:45:50 +02:00
..
appletalk
arcnet
bonding bonding: correct the MAC address for "follow" fail_over_mac policy 2015-10-22 14:37:53 -07:00
caif
can This is the 3.10.99 stable release 2017-04-18 17:17:46 +02:00
cris
danipc
dsa
ethernet net: korina: Fix NAPI versus resources freeing 2019-07-27 21:44:35 +02:00
fddi
hamradio
hippi
hyperv
ieee802154
irda net: irda: Fix use-after-free in irtty_open() 2016-06-07 10:42:46 +02:00
phy net: phy: fix marvell phy status reading 2019-07-27 21:44:34 +02:00
plip
ppp ppp: Destroy the mutex when cleanup 2019-07-27 21:45:26 +02:00
slip ppp, slip: Validate VJ compression slot parameters completely 2016-01-28 21:49:35 -08:00
team team: fix memory leaks 2019-07-27 21:44:43 +02:00
usb cdc_ncm: workaround for EM7455 "silent" data interface 2019-07-27 21:41:55 +02:00
vmxnet3
wan farsync: fix off-by-one bug in fst_add_one 2016-06-07 10:42:49 +02:00
wimax
wireless mwifiex: printk() overflow with 32-byte SSIDs 2019-07-27 21:42:43 +02:00
xen-netback xen: netback: read hotplug script once at start of day. 2015-06-22 16:55:51 -07:00
Kconfig
LICENSE.SRC
Makefile
Space.c
dummy.c
eql.c
ifb.c
loopback.c
macvlan.c
macvtap.c tun/tap: sanitize TUNSETSNDBUF input 2019-07-27 21:45:41 +02:00
mdio.c
mii.c
netconsole.c
ntb_netdev.c
rionet.c rapidio/rionet: fix deadlock on SMP 2016-06-07 10:42:47 +02:00
sb1000.c
sungem_phy.c
tun.c tun: call dev_get_valid_name() before register_netdevice() 2019-07-27 21:45:50 +02:00
veth.c veth: don’t modify ip_summed; doing so treats packets with bad checksums as good. 2016-01-28 21:49:32 -08:00
virtio_net.c virtio-net: drop NETIF_F_FRAGLIST 2015-12-09 13:40:07 -05:00
vxlan.c vxlan: correctly validate VXLAN ID against VXLAN_N_VID 2019-07-27 21:43:11 +02:00
xen-netfront.c