stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 5.15] KVM: x86/mmu: kvm_faultin_pfn has to return false if pfh is returned
@ 2022-03-11  8:13 Andrei Vagin
  2022-03-12 13:11 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 2+ messages in thread
From: Andrei Vagin @ 2022-03-11  8:13 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Sasha Levin, stable
  Cc: Andrei Vagin, Maxim Levitsky, Paolo Bonzini

[ Upstream commit a7cc099f2ec3117678adeb69749bef7e9dde3148 ]

This looks like a typo in 8f32d5e563cb. This change didn't intend to do
any functional changes.

The problem was caught by gVisor tests.

Fixes: 8f32d5e563cb ("KVM: x86/mmu: allow kvm_faultin_pfn to return page fault handling code")
Cc: Maxim Levitsky <mlevitsk@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Andrei Vagin <avagin@gmail.com>
Message-Id: <20211015163221.472508-1-avagin@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 arch/x86/kvm/mmu/mmu.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/x86/kvm/mmu/mmu.c b/arch/x86/kvm/mmu/mmu.c
index 2297dd90fe4a..d6579bae25ca 100644
--- a/arch/x86/kvm/mmu/mmu.c
+++ b/arch/x86/kvm/mmu/mmu.c
@@ -3967,6 +3967,7 @@ static bool kvm_faultin_pfn(struct kvm_vcpu *vcpu, bool prefault, gfn_t gfn,
 
 	*pfn = __gfn_to_pfn_memslot(slot, gfn, false, NULL,
 				    write, writable, hva);
+	return false;
 
 out_retry:
 	*r = RET_PF_RETRY;
-- 
2.35.1


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

* Re: [PATCH 5.15] KVM: x86/mmu: kvm_faultin_pfn has to return false if pfh is returned
  2022-03-11  8:13 [PATCH 5.15] KVM: x86/mmu: kvm_faultin_pfn has to return false if pfh is returned Andrei Vagin
@ 2022-03-12 13:11 ` Greg Kroah-Hartman
  0 siblings, 0 replies; 2+ messages in thread
From: Greg Kroah-Hartman @ 2022-03-12 13:11 UTC (permalink / raw)
  To: Andrei Vagin; +Cc: Sasha Levin, stable, Maxim Levitsky, Paolo Bonzini

On Fri, Mar 11, 2022 at 12:13:33AM -0800, Andrei Vagin wrote:
> [ Upstream commit a7cc099f2ec3117678adeb69749bef7e9dde3148 ]
> 
> This looks like a typo in 8f32d5e563cb. This change didn't intend to do
> any functional changes.
> 
> The problem was caught by gVisor tests.
> 
> Fixes: 8f32d5e563cb ("KVM: x86/mmu: allow kvm_faultin_pfn to return page fault handling code")
> Cc: Maxim Levitsky <mlevitsk@redhat.com>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Signed-off-by: Andrei Vagin <avagin@gmail.com>
> Message-Id: <20211015163221.472508-1-avagin@gmail.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  arch/x86/kvm/mmu/mmu.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/x86/kvm/mmu/mmu.c b/arch/x86/kvm/mmu/mmu.c
> index 2297dd90fe4a..d6579bae25ca 100644
> --- a/arch/x86/kvm/mmu/mmu.c
> +++ b/arch/x86/kvm/mmu/mmu.c
> @@ -3967,6 +3967,7 @@ static bool kvm_faultin_pfn(struct kvm_vcpu *vcpu, bool prefault, gfn_t gfn,
>  
>  	*pfn = __gfn_to_pfn_memslot(slot, gfn, false, NULL,
>  				    write, writable, hva);
> +	return false;
>  
>  out_retry:
>  	*r = RET_PF_RETRY;
> -- 
> 2.35.1
> 

Now queued up, thanks.

greg k-h

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

end of thread, other threads:[~2022-03-12 13:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-11  8:13 [PATCH 5.15] KVM: x86/mmu: kvm_faultin_pfn has to return false if pfh is returned Andrei Vagin
2022-03-12 13:11 ` Greg Kroah-Hartman

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