2019-04-12, 15:57:55 +0200, Jiri Pirko wrote: > Fri, Apr 12, 2019 at 03:04:10PM CEST, s...@queasysnail.net wrote: > >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 > > Out of curiosity, what is a usecase of stacked bonds? I don't see any.
I don't have one, but nothing is preventing that setup. It's just something I accidentally ran into while testing other things. If you want to prevent bond-bond, you also need to prevent things like bond-macvlan-bond for example. The set of rules of what types of stacking make sense seems a bit hairy. -- Sabrina