android_kernel_oneplus_msm8998/drivers/net/bonding
Sabrina Dubroca d8e18cccd2 bonding: fix event handling for stacked bonds
[ Upstream commit 92480b3977fd3884649d404cbbaf839b70035699 ]

When a bond is enslaved to another bond, bond_netdev_event() only
handles the event as if the bond is a master, and skips treating the
bond as a slave.

This leads to a refcount leak on the slave, since we don't remove the
adjacency to its master and the master holds a reference on the slave.

Reproducer:
  ip link add bondL type bond
  ip link add bondU type bond
  ip link set bondL master bondU
  ip link del bondL

No "Fixes:" tag, this code is older than git history.

Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-27 09:33:59 +02:00
..
bond_3ad.c bonding: fix 802.3ad state sent to partner when unbinding slave 2018-12-21 14:09:52 +01:00
bond_alb.c bonding: do not allow rlb updates to invalid mac 2018-05-26 08:48:48 +02:00
bond_debugfs.c
bond_main.c bonding: fix event handling for stacked bonds 2019-04-27 09:33:59 +02:00
bond_netlink.c
bond_options.c bonding: re-evaluate force_primary when the primary slave name changes 2018-07-03 11:21:25 +02:00
bond_procfs.c
bond_sysfs.c
bond_sysfs_slave.c
bonding_priv.h
Makefile