linux/drivers/net/bonding
Xin Long 7436b7ada6 bonding: do not set slave_dev npinfo before slave_enable_netpoll in bond_enslave
commit ddea788c63 upstream.

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: Ben Hutchings <ben@decadent.org.uk>
History 2018-10-21 08:45:39 +01:00
..
bond_3ad.c bonding: prevent out of bound accesses 2016-08-22 22:38:25 +01:00
bond_3ad.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-02-19 01:24:22 -05:00
bond_alb.c bonding: prevent out of bound accesses 2016-08-22 22:38:25 +01:00
bond_alb.h bonding: Added bond_tlb_xmit() for tlb mode. 2014-04-24 13:04:34 -04:00
bond_debugfs.c bonding: create a macro for bond mode and use it 2014-05-16 16:34:32 -04:00
bond_main.c bonding: do not set slave_dev npinfo before slave_enable_netpoll in bond_enslave 2018-10-21 08:45:39 +01:00
bond_netlink.c bonding: set carrier off for devices created through netlink 2017-03-16 02:27:18 +00:00
bond_options.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-05-24 00:32:30 -04:00
bond_options.h bonding: make a generic sysfs option store and fix comments 2014-05-09 16:12:51 -04:00
bond_procfs.c bonding: create a macro for bond mode and use it 2014-05-16 16:34:32 -04:00
bond_sysfs.c bonding: create a macro for bond mode and use it 2014-05-16 16:34:32 -04:00
bond_sysfs_slave.c bonding: create a macro for bond mode and use it 2014-05-16 16:34:32 -04:00
bonding.h bonding: prevent out of bound accesses 2016-08-22 22:38:25 +01:00
Makefile bonding: add sysfs /slave dir for bond slave devices. 2014-01-17 18:51:58 -08:00