projects
/
GitHub
/
exynos8895
/
android_kernel_samsung_universal8895.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2495fbf
)
x86, e820: Guard against array overflowed in __e820_add_region()
author
Cyrill Gorcunov
<gorcunov@openvz.org>
Mon, 24 Aug 2009 17:53:37 +0000
(21:53 +0400)
committer
Ingo Molnar
<mingo@elte.hu>
Wed, 26 Aug 2009 06:17:47 +0000
(08:17 +0200)
Better to be paranoid against unpredicted nr_map modifications.
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
LKML-Reference: <
20090824175551
.
146070377
@openvz.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/e820.c
patch
|
blob
|
blame
|
history
diff --git
a/arch/x86/kernel/e820.c
b/arch/x86/kernel/e820.c
index 7271fa33d79135edd790f854d7c0c91d05d0c20b..2e5e0faa99b5a50f678d4df93333ca3e6b6e56e4 100644
(file)
--- a/
arch/x86/kernel/e820.c
+++ b/
arch/x86/kernel/e820.c
@@
-115,7
+115,7
@@
static void __init __e820_add_region(struct e820map *e820x, u64 start, u64 size,
{
int x = e820x->nr_map;
- if (x
=
= ARRAY_SIZE(e820x->map)) {
+ if (x
>
= ARRAY_SIZE(e820x->map)) {
printk(KERN_ERR "Ooops! Too many entries in the memory map!\n");
return;
}