cvs commit: src/sys/i386/isa clock.c
Bruce Evans
bde at FreeBSD.org
Fri Oct 6 06:24:17 PDT 2006
bde 2006-10-06 13:24:17 UTC
FreeBSD src repository
Modified files: (Branch: RELENG_4)
sys/i386/isa clock.c
Log:
Fixed overflow at 2G for writing clock frequencies using sysctls.
Reads worked correctly using the IU format. Writes only supported
signed integers using the CTLTYPE_INT flag. sysctl(1) parses args for
CTLTYPE_INT using (int)strtol() and has no range checking of course,
so read-write of frequencies larger than INT_MAX always blindly corrupts
the frequency to INT_MAX (2G-1).
This keeps writing of TSC frequencies working up to 4GHz.
Revision Changes Path
1.149.2.8 +2 -2 src/sys/i386/isa/clock.c
More information about the cvs-src
mailing list