linux_dsm_epyc7002/drivers/net
Vlad Yasevich 40b8fe45d1 macvtap: Fix race between device delete and open.
In macvtap device delete and open calls can race and
this causes a list curruption of the vlan queue_list.

The race intself is triggered by the idr accessors
that located the vlan device.  The device is stored
into and removed from the idr under both an rtnl and
a mutex.  However, when attempting to locate the device
in idr, only a mutex is taken.  As a result, once cpu
perfoming a delete may take an rtnl and wait for the mutex,
while another cput doing an open() will take the idr
mutex first to fetch the device pointer and later take
an rtnl to add a queue for the device which may have
just gotten deleted.

With this patch, we now hold the rtnl for the duration
of the macvtap_open() call thus making sure that
open will not race with delete.

CC: Michael S. Tsirkin <mst@redhat.com>
CC: Jason Wang <jasowang@redhat.com>
Signed-off-by: Vladislav Yasevich <vyasevic@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-09-26 15:20:26 -04:00
..
appletalk
arcnet PCI changes for the v3.17 merge window (part 2): 2014-08-14 18:10:33 -06:00
bonding bonding: fix div by zero while enslaving and transmitting 2014-09-13 17:16:56 -04:00
caif
can can: at91_can: add missing prepare and unprepare of the clock 2014-09-18 11:15:37 +02:00
cris eth_v10: remove unnecessary break after return 2014-07-20 21:29:49 -07:00
dsa
ethernet qlcnic: Fix ordering of stats in stats buffer. 2014-09-26 15:11:31 -04:00
fddi drivers/net/fddi/skfp/h/skfbi.h: Remove useless PCI_BASE_2ND macros 2014-09-05 14:51:09 -07:00
hamradio
hippi PCI: Remove DEFINE_PCI_DEVICE_TABLE macro use 2014-08-12 12:15:14 -06:00
hyperv hyperv: Adjust the size of sendbuf region to support ws2008r2 2014-08-06 13:52:07 -07:00
ieee802154
irda PCI changes for the v3.17 merge window (part 2): 2014-08-14 18:10:33 -06:00
phy net/phy: micrel: Disable asymmetric pause for KSZ9031 2014-09-15 14:24:10 -04:00
plip
ppp net: filter: split 'struct sk_filter' into socket and bpf parts 2014-08-02 15:03:58 -07:00
slip
team team: Simplify return path of team_newlink 2014-08-05 16:37:51 -07:00
usb r8152: disable ALDPS 2014-09-22 14:54:19 -04:00
vmxnet3 VMXNET3: Check for map error in vmxnet3_set_mc 2014-09-05 11:50:39 -07:00
wan PCI changes for the v3.17 merge window (part 2): 2014-08-14 18:10:33 -06:00
wimax
wireless brcmfmac: Fix off by one bug in brcmf_count_20mhz_channels() 2014-09-23 10:48:26 -04:00
xen-netback xen-netback: move netif_napi_add before binding interrupt 2014-08-25 17:31:42 -07:00
dummy.c
eql.c
ifb.c
Kconfig
LICENSE.SRC
loopback.c
macvlan.c macvlan: allow to enqueue broadcast pkt on virtual device 2014-09-22 14:10:07 -04:00
macvtap.c macvtap: Fix race between device delete and open. 2014-09-26 15:20:26 -04:00
Makefile net: reduce USB network driver config options. 2014-08-05 16:48:59 -07:00
mdio.c
mii.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
Space.c
sungem_phy.c
tun.c
veth.c
virtio_net.c virtio-net: rx busy polling support 2014-07-23 15:12:02 -07:00
vxlan.c vxlan: fix incorrect initializer in union vxlan_addr 2014-08-22 19:54:56 -07:00
xen-netfront.c xen-netfront: Fix handling packets on compound pages with skb_linearize 2014-08-11 14:46:41 -07:00