linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] KVM: arm64: Fix error return code in init_hyp_mode()
@ 2021-04-06 12:17 Wang Wensheng
  2021-04-06 13:20 ` Marc Zyngier
  0 siblings, 1 reply; 2+ messages in thread
From: Wang Wensheng @ 2021-04-06 12:17 UTC (permalink / raw)
  To: maz, james.morse, alexandru.elisei, suzuki.poulose,
	catalin.marinas, will, dbrazdil, linux-arm-kernel, kvmarm,
	linux-kernel
  Cc: rui.xiang

Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.

Fixes: eeeee7193df0 ("KVM: arm64: Bootstrap PSCI SMC handler in nVHE EL2")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wang Wensheng <wangwensheng4@huawei.com>
---
 arch/arm64/kvm/arm.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/kvm/arm.c b/arch/arm64/kvm/arm.c
index 76a7de1..41e0b2a 100644
--- a/arch/arm64/kvm/arm.c
+++ b/arch/arm64/kvm/arm.c
@@ -1877,8 +1877,10 @@ static int init_hyp_mode(void)
 	if (is_protected_kvm_enabled()) {
 		init_cpu_logical_map();
 
-		if (!init_psci_relay())
+		if (!init_psci_relay()) {
+			err = -ENODEV;
 			goto out_err;
+		}
 	}
 
 	if (is_protected_kvm_enabled()) {
-- 
2.9.4


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH -next] KVM: arm64: Fix error return code in init_hyp_mode()
  2021-04-06 12:17 [PATCH -next] KVM: arm64: Fix error return code in init_hyp_mode() Wang Wensheng
@ 2021-04-06 13:20 ` Marc Zyngier
  0 siblings, 0 replies; 2+ messages in thread
From: Marc Zyngier @ 2021-04-06 13:20 UTC (permalink / raw)
  To: alexandru.elisei, will, Wang Wensheng, linux-arm-kernel,
	suzuki.poulose, dbrazdil, linux-kernel, catalin.marinas,
	james.morse, kvmarm
  Cc: rui.xiang

On Tue, 6 Apr 2021 12:17:59 +0000, Wang Wensheng wrote:
> Fix to return a negative error code from the error handling
> case instead of 0, as done elsewhere in this function.

Applied to kvm-arm64/misc-5.13, thanks!

[1/1] KVM: arm64: Fix error return code in init_hyp_mode()
      commit: 52b9e265d22bccc5843e167da76ab119874e2883

Cheers,

	M.
-- 
Without deviation from the norm, progress is not possible.



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2021-04-06 13:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-06 12:17 [PATCH -next] KVM: arm64: Fix error return code in init_hyp_mode() Wang Wensheng
2021-04-06 13:20 ` Marc Zyngier

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).