bonding: fix the err path for dev hwaddr sync in bond_enslave
authorXin Long <lucien.xin@gmail.com>
Sun, 25 Mar 2018 17:16:45 +0000 (01:16 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Apr 2018 10:32:24 +0000 (12:32 +0200)
commitd7e7ab42581ee12537092e6d005d78a8295fce14
treebf254001474eafb0820c56bca11f8fe64e3ba92e
parent65c42a2d475d904688436a50aa596f643671461f
bonding: fix the err path for dev hwaddr sync in bond_enslave

[ Upstream commit 5c78f6bfae2b10ff70e21d343e64584ea6280c26 ]

vlan_vids_add_by_dev is called right after dev hwaddr sync, so on
the err path it should unsync dev hwaddr. Otherwise, the slave
dev's hwaddr will never be unsync when this err happens.

Fixes: 1ff412ad7714 ("bonding: change the bond's vlan syncing functions with the standard ones")
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Reviewed-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Acked-by: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/bonding/bond_main.c