linux-stable/drivers/net
Xin Long e0286ea084 bonding: do not set slave_dev npinfo before slave_enable_netpoll in bond_enslave
[ Upstream commit ddea788c63 ]

After Commit 8a8efa22f5 ("bonding: sync netpoll code with bridge"), it
would set slave_dev npinfo in slave_enable_netpoll when enslaving a dev
if bond->dev->npinfo was set.

However now slave_dev npinfo is set with bond->dev->npinfo before calling
slave_enable_netpoll. With slave_dev npinfo set, __netpoll_setup called
in slave_enable_netpoll will not call slave dev's .ndo_netpoll_setup().
It causes that the lower dev of this slave dev can't set its npinfo.

One way to reproduce it:

  # modprobe bonding
  # brctl addbr br0
  # brctl addif br0 eth1
  # ifconfig bond0 192.168.122.1/24 up
  # ifenslave bond0 eth2
  # systemctl restart netconsole
  # ifenslave bond0 br0
  # ifconfig eth2 down
  # systemctl restart netconsole

The netpoll won't really work.

This patch is to remove that slave_dev npinfo setting in bond_enslave().

Fixes: 8a8efa22f5 ("bonding: sync netpoll code with bridge")
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-29 11:33:10 +02:00
..
appletalk License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
arcnet License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
bonding bonding: do not set slave_dev npinfo before slave_enable_netpoll in bond_enslave 2018-04-29 11:33:10 +02:00
caif License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
can can: cc770: Fix use after free in cc770_tx_interrupt() 2018-03-28 18:24:45 +02:00
cris License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
dsa net: dsa: mv88e6xxx: Unregister MDIO bus on error path 2018-02-25 11:08:00 +01:00
ethernet i40e: Fix attach VF to VM issue 2018-04-29 11:33:10 +02:00
fddi License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
fjes
hamradio License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
hippi hippi: Fix a Fix a possible sleep-in-atomic bug in rr_close 2018-02-25 11:08:04 +01:00
hyperv hv_netvsc: Fix the TX/RX buffer default sizes 2018-03-24 11:01:22 +01:00
ieee802154 net: ieee802154: adf7242: Fix bug if defined DEBUG 2018-03-19 08:42:49 +01:00
ipvlan ipvlan: add L2 check for packets arriving via virtual devices 2018-03-19 08:42:56 +01:00
phy net: phy: Tell caller result of phy_change() 2018-03-31 18:10:39 +02:00
plip
ppp pptp: remove a buggy dst release in pptp_connect() 2018-04-12 12:32:24 +02:00
slip slip: Check if rstate is initialized before uncompressing 2018-04-19 08:56:16 +02:00
team team: move dev_mc_sync after master_upper_dev_link in team_port_add 2018-04-12 12:32:27 +02:00
usb lan78xx: Correctly indicate invalid OTP 2018-04-19 08:56:16 +02:00
vmxnet3 vmxnet3: repair memory leak 2018-01-31 14:03:49 +01:00
wan hdlc_ppp: carrier detect ok, don't turn off negotiation 2018-03-08 22:41:08 -08:00
wimax License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
wireless Revert "ath10k: send (re)assoc peer command when NSS changed" 2018-04-29 11:33:10 +02:00
xen-netback xen-netfront, xen-netback: Use correct minimum MTU values 2017-10-16 16:00:44 -04:00
dummy.c
eql.c
geneve.c geneve: fix fill_info when link down 2017-12-14 09:53:11 +01:00
gtp.c
ifb.c
Kconfig
LICENSE.SRC
loopback.c
macsec.c macsec: fix memory leaks when skb_to_sgvec fails 2017-10-11 14:07:20 -07:00
macvlan.c macvlan: filter out unsupported feature flags 2018-03-31 18:10:39 +02:00
macvtap.c tap: reference to KVA of an unloaded module causes kernel panic 2017-10-28 19:17:21 +09:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mdio.c
mii.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
Space.c
sungem_phy.c
tap.c net: accept UFO datagrams from tuntap and packet 2017-12-17 15:07:58 +01:00
tun.c tuntap: disable preemption during XDP processing 2018-03-08 22:41:18 -08:00
veth.c veth: set peer GSO values 2018-03-19 08:42:54 +01:00
virtio_net.c virtio_net: Disable interrupts if napi_complete_done rescheduled napi 2018-03-19 08:42:54 +01:00
vrf.c vrf: Fix use after free and double free in vrf_finish_output 2018-04-12 12:32:24 +02:00
vsockmon.c
vxlan.c vxlan: update skb dst pmtu on tx path 2018-03-03 10:24:26 +01:00
xen-netfront.c xen-netfront: Fix race between device setup and open 2018-04-26 11:02:17 +02:00