]> git.ipfire.org Git - people/arne_f/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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Apr 2018 10:32:25 +0000 (12:32 +0200)
commit77b9fc371d4d45e330acab7a1065e9f9b41cf58d
treeaffbd60684d18c763bc2c859dd51b808b57535f3
parent22ab1f8751fa079b818d579cfb0bedfea5ba15e2
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/bonding/bond_main.c