u64 addr;
unsigned long type = (unsigned long)attr->attr;
- if (copy_from_user(&addr, uaddr, sizeof(addr)))
+ if (get_user(addr, uaddr))
return -EFAULT;
r = kvm_vgic_addr(dev->kvm, type, &addr, true);
u64 addr;
unsigned long type = (unsigned long)attr->attr;
- if (copy_from_user(&addr, uaddr, sizeof(addr)))
+ if (get_user(addr, uaddr))
return -EFAULT;
r = kvm_vgic_addr(dev->kvm, type, &addr, false);
if (r)
return (r == -ENODEV) ? -ENXIO : r;
- if (copy_to_user(uaddr, &addr, sizeof(addr)))
+ if (put_user(addr, uaddr))
return -EFAULT;
break;
}