* [PATCH] fix bug in Ethernet Channel Bonding Driver
@ 2010-12-11 4:54 Hillf Danton
2010-12-16 20:24 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Hillf Danton @ 2010-12-11 4:54 UTC (permalink / raw)
To: netdev, linux-kernel
The returned slave is incorrect, if the net device under check is not
charged yet by the master.
Signed-off-by: Hillf Danton <dhillf@gmail.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)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-12-16 20:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-11 4:54 [PATCH] fix bug in Ethernet Channel Bonding Driver Hillf Danton
2010-12-16 20:24 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).