Davide Italiano 1b0c144fc2 Make the callout arithmetic more robust adding checks for overflow.
Without these, if the timeout value passed is "large enough", the
value of the sum of it and other factors (e.g. current time as
returned by sbinuptime() or 'precision' argument) might result in a
negative number. This negative number is then passed to
eventtimers(4), which causes et_start() routine to load et_min_period
into eventtimer, making the CPU where the thread is stuck forever in
timer interrupt handler routine. This is now avoided rounding to
INT64_MAX the timeout period in case of overflow.

Reported by:	kib, pho
Discussed with:	kib, mav
Tested by:	pho (stress2 suite, kevent7.sh scenario)
Approved by:	re (kib)
2013-09-26 10:06:50 +00:00
..
2013-09-07 19:16:02 +00:00
2013-09-19 18:56:00 +00:00
2013-09-05 18:18:23 +00:00
2013-02-02 14:19:50 +00:00
2012-08-22 20:01:57 +00:00
2012-03-28 20:58:30 +00:00
2013-08-07 07:22:56 +00:00
2012-11-14 10:33:12 +00:00
2012-06-25 05:41:16 +00:00
2012-09-04 23:16:55 +00:00
2012-01-26 16:35:09 +00:00
2013-08-24 14:41:49 +00:00
2013-09-19 18:56:00 +00:00
2012-01-02 12:12:10 +00:00
2012-10-25 09:05:21 +00:00
2013-09-05 10:24:09 +00:00
2013-06-29 05:05:57 +00:00