linux_dsm_epyc7002/drivers/net
Jacob Keller 9b2aef128b i40evf: hold the critical task bit lock while opening
If i40evf_open() is called quickly at the same time as a reset occurs
(such as via ethtool) it is possible for the device to attempt to open
while a reset is in progress. This occurs because the driver was not
holding the critical task bit lock during i40evf_open, nor was it
holding it around the call to i40evf_up_complete() in
i40evf_reset_task().

We didn't hold the lock previously because calls to i40evf_down() would
take the bit lock directly, and this would have caused a deadlock.

To avoid this, we'll move the bit lock handling out of i40evf_down() and
into the callers of this function. Additionally, we'll now hold the bit
lock over the entire set of steps when going up or down, to ensure that
we remain consistent.

Ultimately this causes us to serialize the transitions between down and
up properly, and avoid changing status while we're resetting.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2018-01-10 12:41:21 -08:00
..
appletalk
arcnet
bonding
caif
can Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-01-09 10:37:00 -05:00
cris
dsa Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-01-09 10:37:00 -05:00
ethernet i40evf: hold the critical task bit lock while opening 2018-01-10 12:41:21 -08:00
fddi
fjes
hamradio
hippi
hyperv
ieee802154
ipvlan
netdevsim
phy net: phy: marvell: mv88e6390 temperature sensor reading 2018-01-10 15:35:05 -05:00
plip
ppp
slip
team
usb Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-01-09 10:37:00 -05:00
vmxnet3
wan
wimax
wireless
xen-netback
dummy.c
eql.c
geneve.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-01-09 10:37:00 -05:00
gtp.c
ifb.c
Kconfig
LICENSE.SRC
loopback.c
macsec.c macsec: Add support for GCM-AES-256 cipher suite 2018-01-09 11:34:18 -05:00
macvlan.c
macvtap.c
Makefile
mdio.c
mii.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
Space.c
sungem_phy.c
tap.c tun/tap: use ptr_ring instead of skb_array 2018-01-09 10:56:10 -05:00
thunderbolt.c
tun.c tuntap: XDP transmission 2018-01-09 10:57:08 -05:00
veth.c
virtio_net.c virtio_net: propagate linkspeed/duplex settings from the hypervisor 2018-01-09 11:37:56 -05:00
vrf.c
vsockmon.c
vxlan.c
xen-netfront.c xen-netfront: enable device after manual module load 2018-01-08 14:17:03 -05:00