WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] x86: fix number of array elements calculation in XEN

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] x86: fix number of array elements calculation in XEN_DOMCTL_getpageframeinfo3 handler
From: "Jan Beulich" <JBeulich@xxxxxxxxxx>
Date: Fri, 26 Feb 2010 10:33:24 +0000
Delivery-date: Fri, 26 Feb 2010 02:33:43 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

--- 2010-02-19.orig/xen/arch/x86/domctl.c       2010-01-21 20:06:17.000000000 
+0100
+++ 2010-02-19/xen/arch/x86/domctl.c    2010-02-26 11:27:57.000000000 +0100
@@ -194,7 +194,8 @@ long arch_do_domctl(
 
             for ( n = ret = 0; n < num; )
             {
-                unsigned int k = min_t(unsigned int, num - n, PAGE_SIZE / 4);
+                unsigned int k = min_t(unsigned int, num - n,
+                                       PAGE_SIZE / sizeof(*arr));
 
                 if ( copy_from_guest_offset(arr,
                                             domctl->u.getpageframeinfo3.array,



Attachment: fix-20792.patch
Description: Text document

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] x86: fix number of array elements calculation in XEN_DOMCTL_getpageframeinfo3 handler, Jan Beulich <=