aboutsummaryrefslogtreecommitdiffstats
path: root/xen/common/compat
diff options
context:
space:
mode:
authorSteven Smith <ssmith@xensource.com>2007-04-27 13:25:58 +0100
committerSteven Smith <ssmith@xensource.com>2007-04-27 13:25:58 +0100
commitebd759d57e1d8e8512c020fe6d9c6b18034a852d (patch)
tree23f124e749ebaf872b1f9c06d644c15d15027013 /xen/common/compat
parent2752e8f063f2a7f854ebf36bb0c8fea3e3653dc4 (diff)
downloadxen-ebd759d57e1d8e8512c020fe6d9c6b18034a852d.tar.gz
xen-ebd759d57e1d8e8512c020fe6d9c6b18034a852d.tar.bz2
xen-ebd759d57e1d8e8512c020fe6d9c6b18034a852d.zip
32 on 64: Don't lock up Xen if you need to do lots of grant operations
in a single batch for a 32-on-64 domain. Signed-off-by: Steven Smith <sos22@cam.ac.uk>
Diffstat (limited to 'xen/common/compat')
-rw-r--r--xen/common/compat/grant_table.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xen/common/compat/grant_table.c b/xen/common/compat/grant_table.c
index b080447110..aea0bfe78e 100644
--- a/xen/common/compat/grant_table.c
+++ b/xen/common/compat/grant_table.c
@@ -133,7 +133,7 @@ int compat_grant_table_op(unsigned int cmd,
break;
case GNTTABOP_transfer:
- for ( n = 0; i < COMPAT_ARG_XLAT_SIZE / sizeof(*nat.xfer) && i < count && rc == 0; ++i, ++n )
+ for ( n = 0; n < COMPAT_ARG_XLAT_SIZE / sizeof(*nat.xfer) && i < count && rc == 0; ++i, ++n )
{
if ( unlikely(__copy_from_guest_offset(&cmp.xfer, cmp_uop, i, 1)) )
rc = -EFAULT;
@@ -160,7 +160,7 @@ int compat_grant_table_op(unsigned int cmd,
break;
case GNTTABOP_copy:
- for ( n = 0; i < COMPAT_ARG_XLAT_SIZE / sizeof(*nat.copy) && i < count && rc == 0; ++i, ++n )
+ for ( n = 0; n < COMPAT_ARG_XLAT_SIZE / sizeof(*nat.copy) && i < count && rc == 0; ++i, ++n )
{
if ( unlikely(__copy_from_guest_offset(&cmp.copy, cmp_uop, i, 1)) )
rc = -EFAULT;