]> git.baikalelectronics.ru Git - kernel.git/commit
bonding: process the err returned by dev_set_allmulti properly in bond_enslave
authorXin Long <lucien.xin@gmail.com>
Sun, 25 Mar 2018 17:16:47 +0000 (01:16 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 26 Mar 2018 16:51:06 +0000 (12:51 -0400)
commitf21d0c75960ae9345d5c77918a5550c9a2db30f0
tree92874b623663faa0b49a6f7497aa1b3c410d8784
parent69c831d97c928a3cde0f8df942c87ccef27d7b44
bonding: process the err returned by dev_set_allmulti properly in bond_enslave

When dev_set_promiscuity(1) succeeds but dev_set_allmulti(1) fails,
dev_set_promiscuity(-1) should be done before going to the err path.
Otherwise, dev->promiscuity will leak.

Fixes: 487da9ad12b9 ("bonding: Check return of dev_set_promiscuity/allmulti")
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Acked-by: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/bonding/bond_main.c