$NetBSD: patch-CVE-2012-5511_2,v 1.2 2013/01/17 19:37:55 drochner Exp $

see http://lists.xen.org/archives/html/xen-devel/2013-01/msg01193.html

--- xen/arch/x86/mm/paging.c.orig	2012-12-18 12:54:25.000000000 +0000
+++ xen/arch/x86/mm/paging.c
@@ -534,7 +534,8 @@ int paging_log_dirty_range(struct domain
 
         size = ((nr + BITS_PER_LONG - 1) / BITS_PER_LONG) * sizeof (long);
         rv = 0;
-        for ( off = 0; !rv && off < size; off += sizeof zeroes )
+	off = 0;
+	while ( !rv && off < size )
         {
             int todo = min(size - off, (int) PAGE_SIZE);
             if ( copy_to_guest_offset(dirty_bitmap, off, zeroes, todo) )
