Page MenuHomeFreeBSD

D48331.id148800.diff
No OneTemporary

D48331.id148800.diff

diff --git a/sys/x86/x86/tsc.c b/sys/x86/x86/tsc.c
--- a/sys/x86/x86/tsc.c
+++ b/sys/x86/x86/tsc.c
@@ -212,10 +212,18 @@
memcpy(p, regs, sizeof(regs));
p += sizeof(regs);
}
+
+ /*
+ * Begin the search at &brand[5]; we currently expect no less
+ * than four digits for the frequency and either M/G/T modifier
+ * beforehand -- let's avoid getting thrown off by potential
+ * garbage.
+ */
p = NULL;
- for (i = 0; i < sizeof(brand) - 1; i++)
+ for (i = 5; i < sizeof(brand) - 1; i++)
if (brand[i] == 'H' && brand[i + 1] == 'z')
p = brand + i;
+
if (p != NULL) {
p -= 5;
switch (p[4]) {

File Metadata

Mime Type
text/plain
Expires
Wed, Aug 19, 4:22 AM (7 h, 42 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
36917211
Default Alt Text
D48331.id148800.diff (632 B)

Event Timeline