linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] KVM: arm64: vgic-its: Fix wrong return value check in vgic_its_restore_device_tables
@ 2017-09-06  5:26 Vijaya Kumar K
  2017-09-06  7:22 ` Auger Eric
  0 siblings, 1 reply; 4+ messages in thread
From: Vijaya Kumar K @ 2017-09-06  5:26 UTC (permalink / raw)
  To: linux-arm-kernel

scan_its_table() return 1 on success. In the function vgic_its_restore_device_tables()
the return value of scan_its_table() is checked against success value
and returns -EINVAL. Hence migration fails for VM with ITS.

With this patch the failure return value is checked while returning
-EINVAL.

Signed-off-by: Vijaya Kumar K <vkilari@codeaurora.org>

diff --git a/virt/kvm/arm/vgic/vgic-its.c b/virt/kvm/arm/vgic/vgic-its.c
index aa6b68d..63f8ac3 100644
--- a/virt/kvm/arm/vgic/vgic-its.c
+++ b/virt/kvm/arm/vgic/vgic-its.c
@@ -2142,7 +2142,7 @@ static int vgic_its_restore_device_tables(struct vgic_its *its)
 				     vgic_its_restore_dte, NULL);
 	}
 
-	if (ret > 0)
+	if (ret <= 0)
 		ret = -EINVAL;
 
 	return ret;
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-09-19  8:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-06  5:26 [PATCH] KVM: arm64: vgic-its: Fix wrong return value check in vgic_its_restore_device_tables Vijaya Kumar K
2017-09-06  7:22 ` Auger Eric
2017-09-17  8:10   ` vkilari at codeaurora.org
2017-09-19  8:17     ` Auger Eric

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).