summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorgibbs <gibbs@FreeBSD.org>2008-03-01 21:58:34 +0000
committergibbs <gibbs@FreeBSD.org>2008-03-01 21:58:34 +0000
commit2bbc1512154866824168d1dad3926a846d943990 (patch)
treed027e87b8379bfb3d4185ffaf4647babdfe3b98f /sys
parent342833e3ca17a7483d7cc8a2178026613355875e (diff)
downloadFreeBSD-src-2bbc1512154866824168d1dad3926a846d943990.zip
FreeBSD-src-2bbc1512154866824168d1dad3926a846d943990.tar.gz
In est_acpi_info(), initialize count before passing its pointer to
CPUFREQ_DRV_SETTINGS(). The value of count on input is used to prefent overflow of the settings buffer passed into CPUFREQ_DRV_SETTINGS(). This corrects the "est: CPU supports Enhanced Speedstep, but is not recognized." error on my system. MFC after: 1 week
Diffstat (limited to 'sys')
-rw-r--r--sys/i386/cpufreq/est.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/i386/cpufreq/est.c b/sys/i386/cpufreq/est.c
index 885f06a..7383e92 100644
--- a/sys/i386/cpufreq/est.c
+++ b/sys/i386/cpufreq/est.c
@@ -1091,6 +1091,7 @@ est_acpi_info(device_t dev, freq_info **freqs)
sets = malloc(MAX_SETTINGS * sizeof(*sets), M_TEMP, M_NOWAIT);
if (sets == NULL)
return (ENOMEM);
+ count = MAX_SETTINGS;
error = CPUFREQ_DRV_SETTINGS(perf_dev, sets, &count);
if (error)
goto out;
OpenPOWER on IntegriCloud