[ 3.5.y.z extended stable ] Patch "bonding: modify only neigh_parms owned by us" has been added to staging queue

Luis Henriques luis.henriques at canonical.com
Fri Sep 20 19:33:48 UTC 2013


This is a note to let you know that I have just added a patch titled

    bonding: modify only neigh_parms owned by us

to the linux-3.5.y-queue branch of the 3.5.y.z extended stable tree 
which can be found at:

 http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.5.y-queue

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.5.y.z tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Luis

------

>From 9783568d112c1bb789e6f56520824574c876209b Mon Sep 17 00:00:00 2001
From: Veaceslav Falico <vfalico at redhat.com>
Date: Fri, 2 Aug 2013 19:07:39 +0200
Subject: [PATCH] bonding: modify only neigh_parms owned by us

commit 9918d5bf329d0dc5bb2d9d293bcb772bdb626e65 upstream.

Otherwise, on neighbour creation, bond_neigh_init() will be called with a
foreign netdev.

Signed-off-by: Veaceslav Falico <vfalico at redhat.com>
Signed-off-by: David S. Miller <davem at davemloft.net>
Signed-off-by: Luis Henriques <luis.henriques at canonical.com>
---
 drivers/net/bonding/bond_main.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 1e1ae64..c7fd229c 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -3759,11 +3759,17 @@ static int bond_neigh_init(struct neighbour *n)
  * The bonding ndo_neigh_setup is called at init time beofre any
  * slave exists. So we must declare proxy setup function which will
  * be used at run time to resolve the actual slave neigh param setup.
+ *
+ * It's also called by master devices (such as vlans) to setup their
+ * underlying devices. In that case - do nothing, we're already set up from
+ * our init.
  */
 static int bond_neigh_setup(struct net_device *dev,
 			    struct neigh_parms *parms)
 {
-	parms->neigh_setup   = bond_neigh_init;
+	/* modify only our neigh_parms */
+	if (parms->dev == dev)
+		parms->neigh_setup = bond_neigh_init;

 	return 0;
 }
--
1.8.3.2





More information about the kernel-team mailing list