|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 1/2] x86/hvm/dmop: fix EFAULT condition
The copy macro returns false when the copy fails.
Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
---
Cc: Jan Beulich <jbeulich@xxxxxxxx>
Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Cc: Paul Durrant <paul.durrant@xxxxxxxxxx>
Backport to 4.9
---
xen/arch/x86/hvm/dm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xen/arch/x86/hvm/dm.c b/xen/arch/x86/hvm/dm.c
index 87ef4b6ca9..b1cf0d54a2 100644
--- a/xen/arch/x86/hvm/dm.c
+++ b/xen/arch/x86/hvm/dm.c
@@ -182,7 +182,7 @@ static int modified_memory(struct domain *d,
rc = COPY_FROM_GUEST_BUF_OFFSET(extent,
bufs, EXTENTS_BUFFER, (*rem_extents - 1) * sizeof(extent));
- if ( rc )
+ if ( !rc )
return -EFAULT;
if ( extent.pad )
--
2.11.0
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |