HomeFreeBSD

Prevent overflow issues in timeout processing

Description

Prevent overflow issues in timeout processing

Previously, any timeout value for which (timeout * hz) will overflow the
signed integer, will give weird results, since callout(9) routines will
convert negative values of ticks to '1'. For unsigned integer overflow we
will get sufficiently smaller timeout values than expected.

Switch from callout_reset, which requires conversion to int based ticks
to callout_reset_sbt to avoid this.

Also correct isci to correctly resolve ccb timeout.

This was based on the original work done by Eygene Ryabinkin
<rea@freebsd.org> back in 5 Aug 2011 which used a macro to help avoid
the overlow.

Differential Revision: https://reviews.freebsd.org/D1157
Reviewed by: mav, davide
MFC after: 1 month
Sponsored by: Multiplay

Details

Provenance
smhAuthored on
Reviewer
mav
Differential Revision
D1157: Prevent overflow issues in timeout processing
Parents
rS274818: Merge from CheriBSD (3422ebe71b6c06fe78b1be73623b240c219e08e3):
Branches
Unknown
Tags
Unknown

Event Timeline