[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-3.4-testing] e820: fix e820_change_range_type()



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1257797341 0
# Node ID 504204e3a53a643aed488a09c21ab852b1a49dc2
# Parent  c45b172dd5baf38a58b9f338de2f22cef7b44e60
e820: fix e820_change_range_type()

In below case, e820_change_range_type() will return success:
[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>
xen-unstable changeset:   20417:9b393d47b22a
xen-unstable date:        Mon Nov 09 20:05:43 2009 +0000
---
 xen/arch/x86/e820.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -r c45b172dd5ba -r 504204e3a53a xen/arch/x86/e820.c
--- a/xen/arch/x86/e820.c       Mon Nov 09 08:22:51 2009 +0000
+++ b/xen/arch/x86/e820.c       Mon Nov 09 20:09:01 2009 +0000
@@ -538,7 +538,7 @@ int __init e820_change_range_type(
             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-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.