linux-uconsole/drivers/net
Fei Li 7d2c0ec20c tun: wake up waitqueues after IFF_UP is set
[ Upstream commit 72b319dc08 ]

Currently after setting tap0 link up, the tun code wakes tx/rx waited
queues up in tun_net_open() when .ndo_open() is called, however the
IFF_UP flag has not been set yet. If there's already a wait queue, it
would fail to transmit when checking the IFF_UP flag in tun_sendmsg().
Then the saving vhost_poll_start() will add the wq into wqh until it
is waken up again. Although this works when IFF_UP flag has been set
when tun_chr_poll detects; this is not true if IFF_UP flag has not
been set at that time. Sadly the latter case is a fatal error, as
the wq will never be waken up in future unless later manually
setting link up on purpose.

Fix this by moving the wakeup process into the NETDEV_UP event
notifying process, this makes sure IFF_UP has been set before all
waited queues been waken up.

Signed-off-by: Fei Li <lifei.shirley@bytedance.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-03 13:14:48 +02:00
..
appletalk
arcnet
bonding bonding: Always enable vlan tx offload 2019-07-03 13:14:46 +02:00
caif
can can: flexcan: fix timeout when set small bitrate 2019-06-25 11:36:00 +08:00
dsa net: dsa: mv88e6xxx: avoid error message on remove from VLAN 0 2019-06-25 11:35:56 +08:00
ethernet net: stmmac: set IC bit when transmitting frames with HW timestamp 2019-07-03 13:14:47 +02:00
fddi
fjes
hamradio net/hamradio/6pack: use mod_timer() to rearm timers 2019-01-09 17:38:32 +01:00
hippi
hyperv hv_netvsc: Set probe mode to sync 2019-06-22 08:15:13 +02:00
ieee802154 net: ieee802154: fix missing checks for regmap_update_bits 2019-05-25 18:23:43 +02:00
ipvlan net: ipvlan: Fix ipvlan device tso disabled while NETIF_F_IP_CSUM is set 2019-06-25 11:35:58 +08:00
netdevsim
phy net: phy: dp83867: Set up RGMII TX delay 2019-06-22 08:15:20 +02:00
plip
ppp ppp: deflate: Fix possible crash in deflate_init 2019-05-25 18:23:21 +02:00
slip slip: make slhc_free() silently accept an error pointer 2019-05-02 09:58:56 +02:00
team team: Always enable vlan tx offload 2019-07-03 13:14:47 +02:00
usb qmi_wwan: Fix out-of-bounds read 2019-07-03 13:14:43 +02:00
vmxnet3
wan net/wan: fix a double free in x25_asy_open_tty() 2019-01-09 17:38:32 +01:00
wimax
wireless brcmfmac: sdio: Don't tune while the card is off 2019-06-25 11:35:54 +08:00
xen-netback xen-netback: fix occasional leak of grant ref mappings under memory pressure 2019-03-10 07:17:19 +01:00
dummy.c
eql.c
geneve.c geneve: correctly handle ipv6.disable module parameter 2019-03-10 07:17:17 +01:00
gtp.c
ifb.c
Kconfig gtp: change NET_UDP_TUNNEL dependency to select 2019-04-03 06:26:15 +02:00
LICENSE.SRC
loopback.c
macsec.c
macvlan.c macvlan: return correct error value 2018-12-21 14:15:20 +01:00
macvtap.c
Makefile net: Always descend into dsa/ 2019-05-25 18:23:19 +02:00
mdio.c
mii.c
net_failover.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c rapidio/rionet: do not free skb before reading its length 2018-12-05 19:31:59 +01:00
sb1000.c
Space.c
sungem_phy.c
tap.c
thunderbolt.c net: thunderbolt: Unregister ThunderboltIP protocol handler when suspending 2019-06-15 11:54:07 +02:00
tun.c tun: wake up waitqueues after IFF_UP is set 2019-07-03 13:14:48 +02:00
veth.c
virtio_net.c virtio_net: Account for tx bytes and packets on sending xdp_frames 2019-02-12 19:47:23 +01:00
vrf.c vrf: prevent adding upper devices 2019-04-03 06:26:18 +02:00
vsockmon.c
vxlan.c vxlan: Don't call gro_cells_destroy() before device is unregistered 2019-04-03 06:26:18 +02:00
xen-netfront.c xen/netfront: tolerate frags with no data 2019-01-09 17:38:34 +01:00