1
0
Fork 0
alistair23-linux/drivers/net
Jason Wang addf8fc4ac tuntap: correctly wake up process during uninit
We used to check dev->reg_state against NETREG_REGISTERED after each
time we are woke up. But after commit 9e641bdcfa ("net-tun:
restructure tun_do_read for better sleep/wakeup efficiency"), it uses
skb_recv_datagram() which does not check dev->reg_state. This will
result if we delete a tun/tap device after a process is blocked in the
reading. The device will wait for the reference count which was held
by that process for ever.

Fixes this by using RCV_SHUTDOWN which will be checked during
sk_recv_datagram() before trying to wake up the process during uninit.

Fixes: 9e641bdcfa ("net-tun: restructure tun_do_read for better
sleep/wakeup efficiency")
Cc: Eric Dumazet <edumazet@google.com>
Cc: Xi Wang <xii@google.com>
Cc: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-05-20 19:28:37 -04:00
..
appletalk treewide: replace dev->trans_start update with helper 2016-05-04 14:16:49 -04:00
arcnet arcnet: com90xx: add __init attribute 2016-04-19 20:17:45 -04:00
bonding bonding: fix bond_get_stats() 2016-03-18 23:14:15 -04:00
caif
can can: ifi: Add more detailed error reporting 2016-05-09 11:07:28 +02:00
cris treewide: replace dev->trans_start update with helper 2016-05-04 14:16:49 -04:00
dsa net: dsa: mv88e6xxx: remove bridge work 2016-05-16 13:46:24 -04:00
ethernet intel: Add support for IPv6 IP-in-IP offload 2016-05-20 19:25:52 -04:00
fddi
fjes fjes: Fix unnecessary spinlock_irqsave 2016-05-09 22:05:51 -04:00
hamradio Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2016-05-17 16:26:30 -07:00
hippi
hyperv hv_netvsc: set nvdev link after populating chn_table 2016-05-16 13:26:01 -04:00
ieee802154 net: ieee802154/adf7242: syntax error ifdef DEBUG 2016-05-19 11:30:56 -07:00
ipvlan ipvlan: Fix failure path in dev registration during link creation 2016-04-28 17:23:08 -04:00
irda net: irda: avoid null pointer dereference 2016-05-19 11:30:57 -07:00
phy Revert "phy: add support for a reset-gpio specification" 2016-05-20 17:56:59 -04:00
plip
ppp ppp: add rtnetlink device creation support 2016-04-29 16:09:44 -04:00
slip treewide: replace dev->trans_start update with helper 2016-05-04 14:16:49 -04:00
team team: team should sync the port's uc/mc addrs when add a port 2016-03-30 17:06:58 -04:00
usb Revert "net: pegasus: remove dead coding" 2016-05-19 22:56:48 -07:00
vmxnet3 Driver: Vmxnet3: set CHECKSUM_UNNECESSARY for IPv6 packets 2016-04-21 15:28:05 -04:00
wan treewide: replace dev->trans_start update with helper 2016-05-04 14:16:49 -04:00
wimax treewide: replace dev->trans_start update with helper 2016-05-04 14:16:49 -04:00
wireless iwlwifi: fix mis-merge that breaks the driver 2016-05-18 12:11:22 -07:00
xen-netback xen-netback: only deinitialized hash if it was initialized 2016-05-20 17:41:18 -04:00
Kconfig gtp: add initial driver for datapath of GPRS Tunneling Protocol (GTP-U) 2016-05-10 12:25:04 -04:00
LICENSE.SRC
Makefile gtp: add initial driver for datapath of GPRS Tunneling Protocol (GTP-U) 2016-05-10 12:25:04 -04:00
Space.c net: Fix coding style warnings and errors. 2016-05-19 11:48:27 -07:00
dummy.c
eql.c
geneve.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-05-09 15:59:24 -04:00
gtp.c gtp: put back reference to netns when not required anymore 2016-05-12 12:27:15 -04:00
ifb.c ifb: support more features 2016-05-09 00:00:28 -04:00
loopback.c
macsec.c macsec: fix netlink attribute for key id 2016-05-20 11:14:13 -07:00
macvlan.c macvlan: fix failure during registration v3 2016-04-26 15:17:18 -04:00
macvtap.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-05-09 15:59:24 -04:00
mdio.c
mii.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c drivers: net: remove NETDEV_TX_LOCKED 2016-04-26 15:53:05 -04:00
sb1000.c
sungem_phy.c
tun.c tuntap: correctly wake up process during uninit 2016-05-20 19:28:37 -04:00
veth.c veth: Update features to include all tunnel GSO types 2016-04-21 14:14:59 -04:00
virtio_net.c virtio/vhost: new features, performance improvements, cleanups 2016-03-20 13:28:18 -07:00
vrf.c net: vrf: protect changes to private data with rcu 2016-05-16 13:46:24 -04:00
vxlan.c vxlan: set mac_header correctly in GPE mode 2016-05-16 13:37:10 -04:00
xen-netfront.c