linux-stable/drivers
Ivan Vecera f6988cb63a team: don't call netdev_change_features under team->lock
The team_device_event() notifier calls team_compute_features() to fix
vlan_features under team->lock to protect team->port_list. The problem is
that subsequent __team_compute_features() calls netdev_change_features()
to propagate vlan_features to upper vlan devices while team->lock is still
taken. This can lead to deadlock when NETIF_F_LRO is modified on lower
devices or team device itself.

Example:
The team0 as active backup with eth0 and eth1 NICs. Both eth0 & eth1 are
LRO capable and LRO is enabled. Thus LRO is also enabled on team0.

The command 'ethtool -K team0 lro off' now hangs due to this deadlock:

dev_ethtool()
-> ethtool_set_features()
 -> __netdev_update_features(team)
  -> netdev_sync_lower_features()
   -> netdev_update_features(lower_1)
    -> __netdev_update_features(lower_1)
    -> netdev_features_change(lower_1)
     -> call_netdevice_notifiers(...)
      -> team_device_event(lower_1)
       -> team_compute_features(team) [TAKES team->lock]
        -> netdev_change_features(team)
         -> __netdev_update_features(team)
          -> netdev_sync_lower_features()
           -> netdev_update_features(lower_2)
            -> __netdev_update_features(lower_2)
            -> netdev_features_change(lower_2)
             -> call_netdevice_notifiers(...)
              -> team_device_event(lower_2)
               -> team_compute_features(team) [DEADLOCK]

The bug is present in team from the beginning but it appeared after the commit
fd867d5 (net/core: generic support for disabling netdev features down stack)
that adds synchronization of features with lower devices.

Fixes: fd867d5 (net/core: generic support for disabling netdev features down stack)
Cc: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-05-25 12:58:04 -07:00
..
accessibility
acpi Merge branches 'acpi-pci', 'acpi-misc' and 'acpi-tools' 2016-05-16 16:45:48 +02:00
amba ARM: 8566/1: drivers: amba: properly handle devices with power domains 2016-05-05 19:00:40 +01:00
android
ata dmaengine updates for 4.7 2016-05-19 11:47:18 -07:00
atm
auxdisplay
base driver core update for 4.7-rc1 2016-05-20 21:26:15 -07:00
bcma
block zram: introduce per-device debug_stat sysfs node 2016-05-20 17:58:30 -07:00
bluetooth Bluetooth: Add USB ID 13D3:3487 to ath3k 2016-05-13 16:54:59 +02:00
bus Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2016-05-19 10:02:26 -07:00
cdrom
char Merge branch 'akpm' (patches from Andrew) 2016-05-20 22:31:33 -07:00
clk It's the usual big pile of driver updates and additions, but we 2016-05-20 20:18:12 -07:00
clocksource Small release overall. 2016-05-19 11:27:09 -07:00
connector
cpufreq powerpc updates for 4.7 2016-05-20 10:12:41 -07:00
cpuidle Merge back new cpuidle material for v4.7. 2016-05-06 22:08:46 +02:00
crypto crypto: qat - change the adf_ctl_stop_devices to void 2016-05-13 17:30:18 +08:00
dca
devfreq PM / devfreq: style/typo fixes 2016-05-03 11:22:10 +09:00
dio
dma dmaengine updates for 4.7 2016-05-19 11:47:18 -07:00
dma-buf
edac Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2016-05-17 17:05:30 -07:00
eisa
extcon
firewire treewide: replace dev->trans_start update with helper 2016-05-04 14:16:49 -04:00
firmware driver core update for 4.7-rc1 2016-05-20 21:26:15 -07:00
fmc
fpga
gpio driver core update for 4.7-rc1 2016-05-20 21:26:15 -07:00
gpu x86: remove pointless uaccess_32.h complexity 2016-05-22 14:19:37 -07:00
hid Merge branch 'for-4.7/wacom' into for-linus 2016-05-17 12:42:27 +02:00
hsi HSI: omap-ssi: move omap_ssi_port_update_fclk 2016-05-09 22:45:18 +02:00
hv
hwmon
hwspinlock drivers/hwspinlock: use correct radix tree API 2016-05-20 17:58:30 -07:00
hwtracing Char / Misc driver update for 4.7-rc1 2016-05-20 21:20:31 -07:00
i2c Merge branch 'i2c/for-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2016-05-19 17:48:12 -07:00
ide
idle
iio Staging and IIO driver update for 4.7-rc1 2016-05-20 22:20:48 -07:00
infiniband Primary 4.7 merge window changes 2016-05-20 14:35:07 -07:00
input Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2016-05-18 17:12:23 -07:00
iommu Devicetree for 4.7: 2016-05-20 14:51:34 -07:00
ipack
irqchip irqchip: nps: add 64BIT dependency 2016-05-20 10:20:47 -07:00
isdn TTY and Serial driver update for 4.7-rc1 2016-05-20 20:57:27 -07:00
leds leds: gpio: Support the "panic-indicator" firmware property 2016-05-06 10:26:07 +02:00
lguest
lightnvm lightnvm: reserved space calculation incorrect 2016-05-06 12:51:10 -06:00
macintosh
mailbox mailbox: Fix devm_ioremap_resource error detection code 2016-05-08 22:44:46 +05:30
mcb mcb: Delete num_cells variable which is not required 2016-05-03 15:52:28 -07:00
md Merge tag 'md/4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md 2016-05-19 17:25:13 -07:00
media Merge branch 'akpm' (patches from Andrew) 2016-05-19 20:00:06 -07:00
memory Char / Misc driver update for 4.7-rc1 2016-05-20 21:20:31 -07:00
memstick
message SCSI misc on 20160517 2016-05-18 16:38:59 -07:00
mfd - New Drivers 2016-05-20 11:10:24 -07:00
misc Char / Misc driver update for 4.7-rc1 2016-05-20 21:20:31 -07:00
mmc TTY and Serial driver update for 4.7-rc1 2016-05-20 20:57:27 -07:00
mtd Merge branch 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm 2016-05-20 10:01:38 -07:00
net team: don't call netdev_change_features under team->lock 2016-05-25 12:58:04 -07:00
nfc NFC: pn533: handle interrupted commands in pn533_recv_frame 2016-05-10 00:01:47 +02:00
ntb
nubus
nvdimm libnvdimm, pfn: fix ARCH=alpha allmodconfig build failure 2016-05-06 10:20:10 -07:00
nvme Merge branch 'for-4.7/drivers' of git://git.kernel.dk/linux-block 2016-05-17 16:03:32 -07:00
nvmem Merge 4.6-rc7 into char-misc-testing 2016-05-09 09:34:49 +02:00
of Devicetree for 4.7: 2016-05-20 14:51:34 -07:00
oprofile
parisc
parport
pci Char / Misc driver update for 4.7-rc1 2016-05-20 21:20:31 -07:00
pcmcia
perf perf/arm: Special-case hetereogeneous CPUs 2016-05-05 10:13:59 +02:00
phy USB patches for 4.7-rc1 2016-05-20 21:12:25 -07:00
pinctrl Pin control bulk changes for the v4.7 kernel cycle: 2016-05-19 12:50:56 -07:00
platform drivers/platform/x86/wmi.c: use generic UUID library 2016-05-20 17:58:30 -07:00
pnp driver core update for 4.7-rc1 2016-05-20 21:26:15 -07:00
power power supply and reset changes for the v4.7 series 2016-05-20 14:06:21 -07:00
powercap Power management material for v4.7-rc1 2016-05-16 19:17:22 -07:00
pps
ps3
ptp ptp: use memdup_user(). 2016-05-23 14:05:30 -07:00
pwm Merge remote-tracking branches 'regulator/topic/pwm', 'regulator/topic/qcom-spmi', 'regulator/topic/rk808' and 'regulator/topic/s2mps11' into regulator-next 2016-05-13 14:23:46 +01:00
rapidio rapidio/mport_cdev: fix uapi type definitions 2016-05-05 17:38:53 -07:00
ras
regulator Merge remote-tracking branches 'regulator/topic/tps6524x' and 'regulator/topic/twl' into regulator-next 2016-05-13 14:23:49 +01:00
remoteproc remoteproc: Add additional crash reasons 2016-05-12 15:50:19 -07:00
reset
rpmsg rpmsg: add THIS_MODULE to rpmsg_driver in rpmsg core 2016-05-06 11:08:58 -07:00
rtc rtc: tps6586x: rename so module can be autoloaded 2016-05-21 17:07:17 +02:00
s390 TTY and Serial driver update for 4.7-rc1 2016-05-20 20:57:27 -07:00
sbus openprom: fix warning 2016-05-20 18:33:37 -07:00
scsi Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-05-20 20:01:26 -07:00
sfi
sh
sn
soc ARM: SoC driver updates for v4.7 2016-05-18 13:14:02 -07:00
spi dmaengine updates for 4.7 2016-05-19 11:47:18 -07:00
spmi
ssb
staging Staging and IIO driver update for 4.7-rc1 2016-05-20 22:20:48 -07:00
target Primary 4.7 merge window changes 2016-05-20 14:35:07 -07:00
tc
thermal Thermal / ACPI / video: add INT3406 thermal driver 2016-05-11 02:15:31 +02:00
thunderbolt thunderbolt: Fix double free of drom buffer 2016-05-02 12:09:22 -05:00
tty TTY and Serial driver update for 4.7-rc1 2016-05-20 20:57:27 -07:00
uio
usb USB patches for 4.7-rc1 2016-05-20 21:12:25 -07:00
uwb
vfio powerpc updates for 4.7 2016-05-20 10:12:41 -07:00
vhost
video Char / Misc driver update for 4.7-rc1 2016-05-20 21:20:31 -07:00
virt
virtio
vlynq
vme
w1 w1: add ability to set (SRAM) and store (EEPROM) configuration for temp sensors like DS18B20 2016-05-01 14:37:49 -07:00
watchdog driver core update for 4.7-rc1 2016-05-20 21:26:15 -07:00
xen Merge branch 'linus' into efi/core, to pick up fixes 2016-05-07 07:00:07 +02:00
zorro
Kconfig
Makefile