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)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 26 Nov 2021 11:43:28 +0000 (06:43 -0500)
commit5f25e71e311478f9bb0a8ef49e7d8b95316491d7
treec811a827d59320bb082121ee453c640e48d13aa3
parent8503fea6761de32b72585001ac94e5f81ce8ca44
KVM: downgrade two BUG_ONs to WARN_ON_ONCE

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>
virt/kvm/kvm_main.c