summaryrefslogtreecommitdiff
path: root/firmware/ess
diff options
context:
space:
mode:
authorJiri Bohac <jbohac@suse.cz>2010-09-02 05:45:54 (GMT)
committerDavid S. Miller <davem@davemloft.net>2010-09-07 20:57:20 (GMT)
commitcb32f2a0d194212e4e750a8cdedcc610c9ca4876 (patch)
tree2f3762514e3feddb612c9d74379df98ac54eb300 /firmware/ess
parentc4433be6e19e3680727f3f89c938a22e7b789b43 (diff)
downloadlinux-cb32f2a0d194212e4e750a8cdedcc610c9ca4876.tar.xz
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>
Diffstat (limited to 'firmware/ess')
0 files changed, 0 insertions, 0 deletions