[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <AANLkTiksuf0ZDWyjH6ec9rSRoG+5ZdakA-Tha9MXLvy+@mail.gmail.com>
Date: Sat, 11 Dec 2010 12:54:11 +0800
From: Hillf Danton <dhillf@...il.com>
To: netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] fix bug in Ethernet Channel Bonding Driver
The returned slave is incorrect, if the net device under check is not
charged yet by the master.
Signed-off-by: Hillf Danton <dhillf@...il.com>
---
--- a/drivers/net/bonding/bonding.h 2010-11-01 19:54:12.000000000 +0800
+++ b/drivers/net/bonding/bonding.h 2010-12-11 12:48:00.000000000 +0800
@@ -273,11 +273,11 @@ static inline struct slave *bond_get_sla
bond_for_each_slave(bond, slave, i) {
if (slave->dev == slave_dev) {
- break;
+ return slave;
}
}
- return slave;
+ return 0;
}
static inline struct bonding *bond_get_bond_by_slave(struct slave *slave)
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists