remarkable-linux/drivers/net/bonding
Jiri Bohac cb32f2a0d1 bonding: Fix jiffies overflow problems (again)
The time_before_eq()/time_after_eq() functions operate on unsigned
long and only work if the difference between the two compared values
is smaller than half the range of unsigned long (31 bits on i386).

Some of the variables (slave->jiffies, dev->trans_start, dev->last_rx)
used by bonding store a copy of jiffies and may not be updated for a
long time. With HZ=1000, time_before_eq()/time_after_eq() will start
giving bad results after ~25 days.

jiffies will never be before slave->jiffies, dev->trans_start,
dev->last_rx by more than possibly a couple ticks caused by preemption
of this code. This allows us to detect/prevent these overflows by
replacing time_before_eq()/time_after_eq() with time_in_range().

Signed-off-by: Jiri Bohac <jbohac@suse.cz>
Signed-off-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-09-07 13:57:20 -07:00
..
bond_3ad.c bond_3ad.c avoid possible null deref 2009-12-26 20:24:46 -08:00
bond_3ad.h Remove duplicate slow protocol define in bond_3ad.h 2009-05-09 13:15:49 -07:00
bond_alb.c Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2010-07-27 21:01:35 -07:00
bond_alb.h Convert bonding timers to workqueues 2007-10-23 20:32:00 -04:00
bond_ipv6.c bonding: fix bond_inet6addr_event() 2010-07-19 09:34:31 -07:00
bond_main.c bonding: Fix jiffies overflow problems (again) 2010-09-07 13:57:20 -07:00
bond_sysfs.c bonding: prevent sysfs from allowing arp monitoring with alb/tlb 2010-07-30 23:27:57 -07:00
bonding.h bonding: allow user-controlled output slave selection 2010-06-05 02:23:17 -07:00
Makefile bonding: send IPv6 neighbor advertisement on failover 2008-11-06 00:49:37 -05:00