Subject: bug in bonding driver

From: "Chris Friesen" <[email-masked]>
Date: Wed, 24 Mar 2010 12:23:47 -0600

Hi,

One of our guys pointed out what appears to be a bug in
bond_ab_arp_inspect().  There's a chunk of code that looks like this:

	/*
	 * Give slaves 2*delta after being enslaved or made
	 * active.  This avoids bouncing, as the last receive
	 * times need a full ARP monitor cycle to be updated.
	 */
	if (!time_after_eq(jiffies, slave->jiffies +
			   2 * delta_in_ticks))
		continue;

The catch here is that slave->jiffies may not ever get updated after
being set initially, and on long-running systems jiffies will overflow.
 That could cause this check to be true for a substantial amount of time
rather than for just a short period.

One way to fix it would be a boolean which tracks whether or not we've
gone past the time, and if we have then we don't bother actually
checking the time anymore.

Chris