All of lore.kernel.org
 help / color / mirror / Atom feed
* Patch "bonding: set carrier off for devices created through netlink" has been added to the 4.6-stable tree
@ 2016-08-12  7:35 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2016-08-12  7:35 UTC (permalink / raw)
  To: bgalvani, davem, gregkh; +Cc: stable, stable-commits


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

    bonding: set carrier off for devices created through netlink

to the 4.6-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-set-carrier-off-for-devices-created-through-netlink.patch
and it can be found in the queue-4.6 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From foo@baz Fri Aug 12 09:34:33 CEST 2016
From: Beniamino Galvani <bgalvani@redhat.com>
Date: Wed, 13 Jul 2016 18:25:08 +0200
Subject: bonding: set carrier off for devices created through netlink

From: Beniamino Galvani <bgalvani@redhat.com>

[ Upstream commit 005db31d5f5f7c31cfdc43505d77eb3ca5cf8ec6 ]

Commit e826eafa65c6 ("bonding: Call netif_carrier_off after
register_netdevice") moved netif_carrier_off() from bond_init() to
bond_create(), but the latter is called only for initial default
devices and ones created through sysfs:

 $ modprobe bonding
 $ echo +bond1 > /sys/class/net/bonding_masters
 $ ip link add bond2 type bond
 $ grep "MII Status" /proc/net/bonding/*
 /proc/net/bonding/bond0:MII Status: down
 /proc/net/bonding/bond1:MII Status: down
 /proc/net/bonding/bond2:MII Status: up

Ensure that carrier is initially off also for devices created through
netlink.

Signed-off-by: Beniamino Galvani <bgalvani@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/bonding/bond_netlink.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

--- a/drivers/net/bonding/bond_netlink.c
+++ b/drivers/net/bonding/bond_netlink.c
@@ -446,7 +446,11 @@ static int bond_newlink(struct net *src_
 	if (err < 0)
 		return err;
 
-	return register_netdevice(bond_dev);
+	err = register_netdevice(bond_dev);
+
+	netif_carrier_off(bond_dev);
+
+	return err;
 }
 
 static size_t bond_get_size(const struct net_device *bond_dev)


Patches currently in stable-queue which might be from bgalvani@redhat.com are

queue-4.6/macsec-ensure-rx_sa-is-set-when-validation-is-disabled.patch
queue-4.6/bonding-set-carrier-off-for-devices-created-through-netlink.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-08-12  7:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-12  7:35 Patch "bonding: set carrier off for devices created through netlink" has been added to the 4.6-stable tree gregkh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.