WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

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

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] e820: fix e820_change_range_type()
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 09 Nov 2009 12:15:11 -0800
Delivery-date: Mon, 09 Nov 2009 12:15:12 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1257797143 0
# Node ID 9b393d47b22ae261ac45d503d9370567b8db88b4
# Parent  8a91056bea81b5caa8fbeea59094fbdb8d318d56
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/arch/x86/e820.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -r 8a91056bea81 -r 9b393d47b22a xen/arch/x86/e820.c
--- a/xen/arch/x86/e820.c       Mon Nov 09 19:54:28 2009 +0000
+++ b/xen/arch/x86/e820.c       Mon Nov 09 20:05:43 2009 +0000
@@ -574,7 +574,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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] e820: fix e820_change_range_type(), Xen patchbot-unstable <=