Add bond_mc_list_flush() after err_detach as that's the first error path after the addresses are added. The main issue is the mc addresses' refcount which only gets bumped up. v2: update log message and don't move code unnecessarily
Unified · Split
| @@ -1901,6 +1901,11 @@ err_dest_symlinks: · 1900 unmodified lines | ||
| 1901 | 1901 | bond_destroy_slave_symlinks(bond_dev, slave_dev); |
| 1902 | 1902 | |
| 1903 | 1903 | err_detach: |
| 1904 | + if (!USES_PRIMARY(bond->params.mode)) { | |
| 1905 | + netif_addr_lock_bh(bond_dev); | |
| 1906 | + bond_mc_list_flush(bond_dev, slave_dev); | |
| 1907 | + netif_addr_unlock_bh(bond_dev); | |
| 1908 | + } | |
| 1904 | 1909 | write_lock_bh(&bond->lock); |
| 1905 | 1910 | bond_detach_slave(bond, new_slave); |
| 1906 | 1911 | write_unlock_bh(&bond->lock); |