]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerSasha Levin <alexander.levin@microsoft.com>
Wed, 23 May 2018 01:36:31 +0000 (21:36 -0400)
commit346ac7653b28a854b989f032954fd01793402c8c
tree3bc2bbfb871e43c8f12d210811cdeb1f9f199e65
parent89514eac132d8d9aee62195d1c911fc77d9d7a6a
bonding: process the err returned by dev_set_allmulti properly in bond_enslave

[ Upstream commit 9f5a90c107741b864398f4ac0014711a8c1d8474 ]

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: 7e1a1ac1fbaa ("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>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
drivers/net/bonding/bond_main.c