Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bonding: fix a potential double-unregister
When we tear down a network namespace, we unregister all the netdevices within it. So we may queue a slave device and a bonding device together in the same unregister queue. If the only slave device is non-ethernet, it would automatically unregister the bonding device as well. Thus, we may end up unregistering the bonding device twice. Workaround this special case by checking reg_state. Fixes: 9b5e383 ("net: Introduce unregister_netdevice_many()") Reported-by: [email protected] Cc: Eric Dumazet <[email protected]> Cc: Andy Gospodarek <[email protected]> Cc: Jay Vosburgh <[email protected]> Signed-off-by: Cong Wang <[email protected]> Signed-off-by: David S. Miller <[email protected]>
- Loading branch information