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

[Xen-changelog] [xen-unstable] Fix off-by-one error in do_memory_op()'s start_extent range check



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1269952045 -3600
# Node ID 81d785fae7af78d050720dedf1446bca35de5c39
# Parent  1bcd2519a11ac66abd0d4c56afca42d4ed086a3b
Fix off-by-one error in do_memory_op()'s start_extent range check

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
---
 xen/common/memory.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -r 1bcd2519a11a -r 81d785fae7af xen/common/memory.c
--- a/xen/common/memory.c       Tue Mar 30 11:16:25 2010 +0100
+++ b/xen/common/memory.c       Tue Mar 30 13:27:25 2010 +0100
@@ -525,7 +525,7 @@ long do_memory_op(unsigned long cmd, XEN
         if ( reservation.nr_extents > (ULONG_MAX >> MEMOP_EXTENT_SHIFT) )
             return start_extent;
 
-        if ( unlikely(start_extent > reservation.nr_extents) )
+        if ( unlikely(start_extent >= reservation.nr_extents) )
             return start_extent;
 
         args.extent_list  = reservation.extent_start;

_______________________________________________
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®.