Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F171426923
D57614.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
646 B
Referenced Files
None
Subscribers
None
D57614.diff
View Options
diff --git a/sys/x86/cpufreq/est.c b/sys/x86/cpufreq/est.c
--- a/sys/x86/cpufreq/est.c
+++ b/sys/x86/cpufreq/est.c
@@ -1181,11 +1181,15 @@
/* Figure out the bus clock. */
freq = atomic_load_acq_64(&tsc_freq) / 1000000;
id = msr >> 32;
+ if ((id >> 8) == 0)
+ return (EOPNOTSUPP);
bus = freq / (id >> 8);
device_printf(dev, "Guessed bus clock (high) of %d MHz\n", bus);
if (!bus_speed_ok(bus)) {
/* We may be running on the low frequency. */
id = msr >> 48;
+ if ((id >> 8) == 0)
+ return (EOPNOTSUPP);
bus = freq / (id >> 8);
device_printf(dev, "Guessed bus clock (low) of %d MHz\n", bus);
if (!bus_speed_ok(bus))
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Sep 12, 2:09 AM (22 m, 35 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34046927
Default Alt Text
D57614.diff (646 B)
Attached To
Mode
D57614: est: prevent divide-by-zero in est_msr_info
Attached
Detach File
Event Timeline
Log In to Comment