• Sabrina Dubroca's avatar
    bonding: fix event handling for stacked bonds · 92480b39
    Sabrina Dubroca authored
    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: default avatarSabrina Dubroca <sd@queasysnail.net>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    92480b39
bond_main.c 136 KB