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

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



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1269952832 -3600
# Node ID ac4db6013098f89ff645eb65eabea289f93011e1
# Parent  856fbb601c9cc1729c3edc04d3fabae97a1d71e1
Fix off-by-one error in do_memory_op()'s start_extent range check

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
xen-unstable changeset:   21085:81d785fae7af
xen-unstable date:        Tue Mar 30 13:27:25 2010 +0100
---
 xen/common/memory.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -r 856fbb601c9c -r ac4db6013098 xen/common/memory.c
--- a/xen/common/memory.c       Tue Mar 30 13:39:53 2010 +0100
+++ b/xen/common/memory.c       Tue Mar 30 13:40:32 2010 +0100
@@ -437,7 +437,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®.