ia64/xen-unstable

changeset 16680:6c0aec4604f7

[IA64] Fix XEN_DOMCTL_shadow_op. it should check copy_to_guest() return value.

Pointed out by Samuel Thibault.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
author Alex Williamson <alex.williamson@hp.com>
date Sun Dec 30 12:53:54 2007 -0700 (2007-12-30)
parents 3d7213deb33e
children ecdc7b5f650b
files xen/arch/ia64/xen/dom0_ops.c
line diff
     1.1 --- a/xen/arch/ia64/xen/dom0_ops.c	Sun Dec 30 12:50:09 2007 -0700
     1.2 +++ b/xen/arch/ia64/xen/dom0_ops.c	Sun Dec 30 12:53:54 2007 -0700
     1.3 @@ -168,7 +168,8 @@ long arch_do_domctl(xen_domctl_t *op, XE
     1.4          {
     1.5              ret = shadow_mode_control(d, &op->u.shadow_op);
     1.6              put_domain(d);
     1.7 -            copy_to_guest(u_domctl, op, 1);
     1.8 +            if (copy_to_guest(u_domctl, op, 1))
     1.9 +                ret = -EFAULT;
    1.10          } 
    1.11      }
    1.12      break;