projects
/
seabios.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bbce6d6
)
Warn if not enough space in smp_mtrr array.
author
Kevin O'Connor
<kevin@koconnor.net>
Fri, 29 Jul 2011 23:21:07 +0000
(19:21 -0400)
committer
Kevin O'Connor
<kevin@koconnor.net>
Fri, 29 Jul 2011 23:21:07 +0000
(19:21 -0400)
src/smp.c
patch
|
blob
|
history
diff --git
a/src/smp.c
b/src/smp.c
index 2317d3683f12a1afeff67ed67d9a609beb459866..8c077a1bab49e2a80b810ab1eb673a5291df5e23 100644
(file)
--- a/
src/smp.c
+++ b/
src/smp.c
@@
-24,8
+24,10
@@
void
wrmsr_smp(u32 index, u64 val)
{
wrmsr(index, val);
- if (smp_mtrr_count >= ARRAY_SIZE(smp_mtrr))
+ if (smp_mtrr_count >= ARRAY_SIZE(smp_mtrr)) {
+ warn_noalloc();
return;
+ }
smp_mtrr[smp_mtrr_count].ecx = index;
smp_mtrr[smp_mtrr_count].eax = val;
smp_mtrr[smp_mtrr_count].edx = val >> 32;