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

[Xen-devel] [PATCH] fix off-by-one error in do_memory_op()'s start_extent range check



Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

--- 2010-03-02.orig/xen/common/memory.c 2010-02-05 09:17:57.000000000 +0100
+++ 2010-03-02/xen/common/memory.c      2010-03-30 13:22:49.000000000 +0200
@@ -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;



Attachment: memory-op-start-extent-check.patch
Description: Text document

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

 


Rackspace

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