The copy macro returns false when the copy fails.

Signed-off-by: Wei Liu <wei.l...@citrix.com>
---
Cc: Jan Beulich <jbeul...@suse.com>
Cc: Andrew Cooper <andrew.coop...@citrix.com>
Cc: Paul Durrant <paul.durr...@citrix.com>

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@lists.xen.org
https://lists.xen.org/xen-devel

Reply via email to