Jan Beulich
2010-Mar-30 11:34 UTC
[Xen-devel] [PATCH] fix off-by-one error in do_memory_op()''s start_extent range check
Signed-off-by: Jan Beulich <jbeulich@novell.com> --- 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; _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel