[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-4.2-testing] ACPI: fix return value of XEN_PM_PDC platform op
# HG changeset patch # User Jan Beulich <jbeulich@xxxxxxxx> # Date 1354788615 -3600 # Node ID 8194979b8104f8a2f539dc5289bb2316fcdbf571 # Parent 594b333b211d8926270e65b6dc962d1d26a6e73b ACPI: fix return value of XEN_PM_PDC platform op 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@xxxxxxxx> Acked-by: Keir Fraser <keir@xxxxxxx> xen-unstable changeset: 26196:5faf5b8b702e xen-unstable date: Wed Nov 28 09:03:51 UTC 2012 --- diff -r 594b333b211d -r 8194979b8104 xen/drivers/acpi/pmstat.c --- a/xen/drivers/acpi/pmstat.c Thu Dec 06 11:07:56 2012 +0100 +++ b/xen/drivers/acpi/pmstat.c Thu Dec 06 11:10:15 2012 +0100 @@ -523,8 +523,8 @@ int acpi_set_pdc_bits(u32 acpi_id, XEN_G 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; } _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |