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:30:50 +0000 (09:30 +0100)
commit49b7e496928e5c5b8c2917a42d9d532a36028a14
tree0f524f7abaa1f53969e8df6d50c4f35fc42edcb2
parent8d0f56c2ed716d5db716893bda5e9250a9a7f2ee
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