Should return -EFAULT when copying to guest memory fails.
Once touching this code, also switch to using the more relaxed copy
function (copying from the same guest memory already validated the
virtual address range).
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
ACPI_PDC_SMP_C1PT) & ~mask;
ret = arch_acpi_set_pdc_bits(acpi_id, bits, mask);
}
- if ( !ret )
- ret = copy_to_guest_offset(pdc, 2, bits + 2, 1);
+ if ( !ret && __copy_to_guest_offset(pdc, 2, bits + 2, 1) )
+ ret = -EFAULT;
return ret;
}