1
0
Fork 0
alistair23-linux/drivers/net
Vitaly Kuznetsov e8f0a89cd7 hv_netvsc: fix a race between netvsc_send() and netvsc_init_buf()
Fix in commit 8809883482 ("hv_netvsc: set nvdev link after populating
chn_table") turns out to be incomplete. A crash in
netvsc_get_next_send_section() is observed on mtu change when the device
is under load. The race I identified is: if we get to netvsc_send() after
we set net_device_ctx->nvdev link in netvsc_device_add() but before we
finish netvsc_connect_vsp()->netvsc_init_buf() send_section_map is not
allocated and we crash. Unfortunately we can't set net_device_ctx->nvdev
link after the netvsc_init_buf() call as during the negotiation we need
to receive packets and on the receive path we check for it. It would
probably be possible to split nvdev into a pair of nvdev_in and nvdev_out
links and check them accordingly in get_outbound_net_device()/
get_inbound_net_device() but this looks like an overkill.

Check that send_section_map is allocated in netvsc_send().

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-10-21 11:27:31 -04:00
..
appletalk net: deprecate eth_change_mtu, remove usage 2016-10-13 09:36:57 -04:00
arcnet
bonding net: bonding: Flip to the new dev walk API 2016-10-18 11:44:58 -04:00
caif virtio/vhost: new features for 4.8 2016-08-06 09:20:13 -04:00
can Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-10-02 22:20:41 -04:00
cris net: deprecate eth_change_mtu, remove usage 2016-10-13 09:36:57 -04:00
dsa net: dsa: mv88e6xxx: fix non static symbol warning 2016-10-18 14:26:00 -04:00
ethernet ethernet: use net core MTU range checking in more drivers 2016-10-20 14:51:08 -04:00
fddi net: use core MTU range checking in misc drivers 2016-10-20 14:51:10 -04:00
fjes net: use core MTU range checking in misc drivers 2016-10-20 14:51:10 -04:00
hamradio 6pack: fix buffer length mishandling 2016-09-20 22:51:30 -04:00
hippi net: use core MTU range checking in misc drivers 2016-10-20 14:51:10 -04:00
hyperv hv_netvsc: fix a race between netvsc_send() and netvsc_init_buf() 2016-10-21 11:27:31 -04:00
ieee802154 fakelb: fix schedule while atomic 2016-09-19 20:19:34 +02:00
ipvlan ipvlan: constify l3mdev_ops structure 2016-10-15 17:49:57 -04:00
irda
phy net: phy: aquantia: add PHY ID of AQR106 and AQR107 2016-10-20 14:25:23 -04:00
plip net: deprecate eth_change_mtu, remove usage 2016-10-13 09:36:57 -04:00
ppp ppp: declare PPP devices as LLTX 2016-08-31 14:33:09 -07:00
slip net: use core MTU range checking in misc drivers 2016-10-20 14:51:10 -04:00
team team: loadbalance: push lacpdus to exact delivery 2016-08-26 13:08:59 -07:00
usb net: use core MTU range checking in USB NIC drivers 2016-10-20 14:51:08 -04:00
vmxnet3 net: use core MTU range checking in virt drivers 2016-10-20 14:51:09 -04:00
wan net: use core MTU range checking in WAN drivers 2016-10-20 14:51:09 -04:00
wimax net: use core MTU range checking in wireless drivers 2016-10-20 14:51:08 -04:00
wireless net: use core MTU range checking in wireless drivers 2016-10-20 14:51:08 -04:00
xen-netback net: use core MTU range checking in virt drivers 2016-10-20 14:51:09 -04:00
Kconfig ipvlan: Fix dependency issue 2016-09-20 22:55:23 -04:00
LICENSE.SRC
Makefile
Space.c
dummy.c
eql.c
geneve.c net: use core MTU range checking in core net infra 2016-10-20 14:51:09 -04:00
gtp.c gtp: remove unused including <linux/version.h> 2016-06-17 22:28:49 -07:00
ifb.c
loopback.c loopback: make use of NETIF_F_GSO_SOFTWARE 2016-06-03 19:37:21 -04:00
macsec.c net: use core MTU range checking in core net infra 2016-10-20 14:51:09 -04:00
macvlan.c net: use core MTU range checking in core net infra 2016-10-20 14:51:09 -04:00
macvtap.c macvtap: fix use after free for skb_array during release 2016-08-11 09:55:51 -07:00
mdio.c
mii.c
netconsole.c
nlmon.c
ntb_netdev.c net: use core MTU range checking in core net infra 2016-10-20 14:51:09 -04:00
rionet.c net: use core MTU range checking in misc drivers 2016-10-20 14:51:10 -04:00
sb1000.c net: deprecate eth_change_mtu, remove usage 2016-10-13 09:36:57 -04:00
sungem_phy.c
tun.c net: use core MTU range checking in core net infra 2016-10-20 14:51:09 -04:00
veth.c net: use core MTU range checking in core net infra 2016-10-20 14:51:09 -04:00
virtio_net.c net: use core MTU range checking in virt drivers 2016-10-20 14:51:09 -04:00
vrf.c net: vrf: Remove RT_FL_TOS 2016-09-17 10:05:05 -04:00
vxlan.c net: use core MTU range checking in core net infra 2016-10-20 14:51:09 -04:00
xen-netfront.c net: use core MTU range checking in virt drivers 2016-10-20 14:51:09 -04:00