KVM: downgrade two BUG_ONs to WARN_ON_ONCE
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 22 Nov 2021 23:24:01 +0000 (18:24 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Dec 2021 08:32:34 +0000 (09:32 +0100)
commit54bf0b0d3536bf1651c66f60f621532e8d6c50af
treef1eaad3025786a661cf8b49b033a354eec645081
parent4b65555a501e9fcaaeb302af1ebba279ed3bf653
KVM: downgrade two BUG_ONs to WARN_ON_ONCE

[ Upstream commit 5f25e71e311478f9bb0a8ef49e7d8b95316491d7 ]

This is not an unrecoverable situation.  Users of kvm_read_guest_offset_cached
and kvm_write_guest_offset_cached must expect the read/write to fail, and
therefore it is possible to just return early with an error value.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
virt/kvm/kvm_main.c