Skip to contentSkip to conversation

Patch "bonding: process the err returned by dev_set_allmulti properly in bond_enslave" has been added to the 4.9-stable tree

PATCH [email protected] 1 participant 1 message Apr 11, 2018

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

bonding: process the err returned by dev_set_allmulti properly in bond_enslave

to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
bonding-process-the-err-returned-by-dev_set_allmulti-properly-in-bond_enslave.patch
and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From foo@baz Wed Apr 11 10:26:56 CEST 2018

From: Xin Long <[email protected]>
Date: Mon, 26 Mar 2018 01:16:47 +0800
Subject: bonding: process the err returned by dev_set_allmulti properly in bond_enslave

From: Xin Long <[email protected]>

[ 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")
---
 drivers/net/bonding/bond_main.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/net/bonding/bond_main.c +4 -1
@@ -1700,8 +1700,11 @@ int bond_enslave(struct net_device *bond
 		/* set allmulti level to new slave */
 		if (bond_dev->flags & IFF_ALLMULTI) {
 			res = dev_set_allmulti(slave_dev, 1);
-			if (res)
+			if (res) {
+				if (bond_dev->flags & IFF_PROMISC)
+					dev_set_promiscuity(slave_dev, -1);
 				goto err_sysfs_del;
+			}
 		}
 
 		netif_addr_lock_bh(bond_dev);

Patches currently in stable-queue which might be from [email protected] are

queue-4.9/team-move-dev_mc_sync-after-master_upper_dev_link-in-team_port_add.patch queue-4.9/bonding-process-the-err-returned-by-dev_set_allmulti-properly-in-bond_enslave.patch queue-4.9/bonding-fix-the-err-path-for-dev-hwaddr-sync-in-bond_enslave.patch queue-4.9/bonding-move-dev_mc_sync-after-master_upper_dev_link-in-bond_enslave.patch queue-4.9/route-check-sysctl_fib_multipath_use_neigh-earlier-than-hash.patch queue-4.9/sctp-fix-recursive-locking-warning-in-sctp_do_peeloff.patch