|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] [PATCH] e820: fix e820_change_range_type()
In below case, e820_change_range_type() will return succee:
[s, e] is in the middle of [rs, re] and e820->nr_map+1 >= ARRAY_SIZE(e820->map)
actually, it's failed, so this patch fix it
Signed-off-by: Xiao Guangrong <ericxiao.gr@xxxxxxxxx>
diff -r f23b859e237a -r 93bc06dd1161 xen/arch/x86/e820.c
--- a/xen/arch/x86/e820.c Tue Nov 10 02:34:16 2009 +0800
+++ b/xen/arch/x86/e820.c Tue Nov 10 02:41:59 2009 +0800
@@ -574,7 +574,7 @@
e820->map[i+1].type = new_type;
}
}
- else if ( e820->nr_map+1 < ARRAY_SIZE(e820->map) )
+ else
{
if ( (e820->nr_map + 2) > ARRAY_SIZE(e820->map) )
goto overflow;
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-devel] [PATCH] e820: fix e820_change_range_type(),
Xiao Guangrong <=
|
|
|
|
|