From: "Jan Beulich" Subject: [PATCH] x86: fix number of array elements calculation in XEN_DOMCTL_getpageframeinfo3 handler Date: Fri, 26 Feb 2010 10:33:24 +0000 Message-ID: <4B87B1840200007800031779@vpn.id2.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=__Part6349A264.0__=" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org This is a MIME message. If you are reading this text, you may want to consider changing to a mail reader or gateway that understands how to properly handle MIME multipart messages. --=__Part6349A264.0__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Signed-off-by: Jan Beulich --- 2010-02-19.orig/xen/arch/x86/domctl.c 2010-01-21 20:06:17.0000000= 00 +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( =20 for ( n =3D ret =3D 0; n < num; ) { - unsigned int k =3D min_t(unsigned int, num - n, PAGE_SIZE = / 4); + unsigned int k =3D min_t(unsigned int, num - n, + PAGE_SIZE / sizeof(*arr)); =20 if ( copy_from_guest_offset(arr, domctl->u.getpageframeinfo3.ar= ray, --=__Part6349A264.0__= Content-Type: text/plain; name="fix-20792.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="fix-20792.patch" Signed-off-by: Jan Beulich =0A=0A--- 2010-02-19.orig/x= en/arch/x86/domctl.c 2010-01-21 20:06:17.000000000 +0100=0A+++ = 2010-02-19/xen/arch/x86/domctl.c 2010-02-26 11:27:57.000000000 = +0100=0A@@ -194,7 +194,8 @@ long arch_do_domctl(=0A =0A for ( = n =3D ret =3D 0; n < num; )=0A {=0A- unsigned = int k =3D min_t(unsigned int, num - n, PAGE_SIZE / 4);=0A+ = unsigned int k =3D min_t(unsigned int, num - n,=0A+ = PAGE_SIZE / sizeof(*arr));=0A =0A if ( = copy_from_guest_offset(arr,=0A = domctl->u.getpageframeinfo3.array,=0A --=__Part6349A264.0__= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --=__Part6349A264.0__=--