xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] x86: fix number of array elements calculation in XEN_DOMCTL_getpageframeinfo3 handler
@ 2010-02-26 10:33 Jan Beulich
  0 siblings, 0 replies; only message in thread
From: Jan Beulich @ 2010-02-26 10:33 UTC (permalink / raw)
  To: xen-devel

[-- Attachment #1: Type: text/plain, Size: 663 bytes --]

Signed-off-by: Jan Beulich <jbeulich@novell.com>

--- 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 #2: fix-20792.patch --]
[-- Type: text/plain, Size: 657 bytes --]

Signed-off-by: Jan Beulich <jbeulich@novell.com>

--- 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 #3: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-02-26 10:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-26 10:33 [PATCH] x86: fix number of array elements calculation in XEN_DOMCTL_getpageframeinfo3 handler Jan Beulich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).