Skip to content
Commit b2740d35 authored by Paolo Bonzini's avatar Paolo Bonzini
Browse files

KVM: ensure __gfn_to_pfn_memslot initializes *writable



For the kvm_is_error_hva, ubsan complains if the uninitialized writable
is passed to __direct_map, even though the value itself is not used
(__direct_map goes to mmu_set_spte->set_spte->set_mmio_spte but never
looks at that argument).

Ensuring that __gfn_to_pfn_memslot initializes *writable is cheap and
avoids this kind of issue.

Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 107d44a2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment