linux-stable/drivers/net
Alexander Duyck c5455e3fab e1000e: Use rtnl_lock to prevent race conditions between net and pci/pm
commit a702381940 upstream.

This patch is meant to address possible race conditions that can exist
between network configuration and power management. A similar issue was
fixed for igb in commit 9474933caf ("igb: close/suspend race in
netif_device_detach").

In addition it consolidates the code so that the PCI error handling code
will essentially perform the power management freeze on the device prior to
attempting a reset, and will thaw the device afterwards if that is what it
is planning to do. Otherwise when we call close on the interface it should
see it is detached and not attempt to call the logic to down the interface
and free the IRQs again.

From what I can tell the check that was adding the check for __E1000_DOWN
in e1000e_close was added when runtime power management was added. However
it should not be relevant for us as we perform a call to
pm_runtime_get_sync before we call e1000_down/free_irq so it should always
be back up before we call into this anyway.

Reported-by: Morumuri Srivalli <smorumu1@in.ibm.com>
Signed-off-by: Alexander Duyck <alexander.h.duyck@linux.intel.com>
Tested-by: David Dai <zdai@linux.vnet.ibm.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Cc: Kai-Heng Feng <kai.heng.feng@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-02-28 17:22:14 +01:00
..
appletalk
arcnet
bonding bonding/alb: properly access headers in bond_alb_xmit() 2020-02-11 04:35:48 -08:00
caif
can can: tcan4x5x: tcan4x5x_parse_config(): reset device before register access 2020-02-01 09:34:44 +00:00
dsa net: dsa: microchip: enable module autoprobe 2020-02-11 04:35:49 -08:00
ethernet e1000e: Use rtnl_lock to prevent race conditions between net and pci/pm 2020-02-28 17:22:14 +01:00
fddi
fjes fjes: fix missed check in fjes_acpi_add 2019-12-31 16:41:14 +01:00
hamradio 6pack,mkiss: fix possible deadlock 2020-01-04 19:18:36 +01:00
hippi
hyperv hv_netvsc: flag software created hash value 2020-01-26 10:01:06 +01:00
ieee802154
ipvlan net: core: add generic lockdep keys 2019-10-24 14:53:48 -07:00
netdevsim netdevsim: fix stack-out-of-bounds in nsim_dev_debugfs_init() 2020-02-11 04:35:06 -08:00
phy net: phy: fixed_phy: fix use-after-free when checking link GPIO 2020-02-24 08:36:43 +01:00
plip
ppp ppp: Adjust indentation into ppp_async_input 2020-02-11 04:35:46 -08:00
slip can, slip: Protect tty->disc_data in write_wakeup and close with RCU 2020-01-29 16:45:19 +01:00
team team: call RCU read lock when walking the port_list 2019-12-31 16:43:54 +01:00
usb r8152: disable DelayPhyPwrChg 2020-02-05 21:22:50 +00:00
vmxnet3
wan wan: ixp4xx_hss: fix compile-testing on 64-bit 2020-02-24 08:36:46 +01:00
wimax wimax: i2400: Fix memory leak in i2400m_op_rfkill_sw_toggle 2019-10-29 16:20:25 -07:00
wireless iwlwifi: mvm: Check the sta is not NULL in iwl_mvm_cfg_he_sta() 2020-02-24 08:37:01 +01:00
xen-netback xen/netback: fix error path of xenvif_connect_data() 2019-10-19 11:43:29 -07:00
dummy.c
eql.c
geneve.c net: ipv6_stub: use ip6_dst_lookup_flow instead of ip6_dst_lookup 2019-12-18 16:08:42 +01:00
gtp.c gtp: use __GFP_NOWARN to avoid memalloc warning 2020-02-11 04:35:04 -08:00
ifb.c
Kconfig
LICENSE.SRC
loopback.c
macsec.c net: remove unnecessary variables and callback 2019-10-24 14:53:49 -07:00
macvlan.c macvlan: use skb_reset_mac_header() in macvlan_queue_xmit() 2020-01-23 08:22:49 +01:00
macvtap.c
Makefile
mdio.c
mii.c
net_failover.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
Space.c
sungem_phy.c
tap.c
thunderbolt.c
tun.c tun: add mutex_unlock() call and napi.skb clearing in tun_get_user() 2020-01-29 16:45:22 +01:00
veth.c
virtio_net.c
vrf.c net: core: add generic lockdep keys 2019-10-24 14:53:48 -07:00
vsockmon.c
vxlan.c vxlan: fix tos value before xmit 2020-01-12 12:21:49 +01:00
xen-netfront.c