mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-10 20:48:12 +00:00
KVM: Harden kvm_vcpu_map() against double-mapping and thus leaking references
Now that all on-stack maps use CLASS(kvm_vcpu_map_local), i.e. now that all maps are zero-allocated, explicitly put any existing mappings/references when establishing a new mapping to harden against KVM bugs leaking memory, but yell loudly as the owner of the map is still ultimately responsible for the lifecycle of the mapping. Suggested-by: Yosry Ahmed <yosry@kernel.org> Link: https://patch.msgid.link/20260724004757.131420-7-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com>
This commit is contained in:
parent
e060b94a1c
commit
e186d4e34a
1 changed files with 3 additions and 0 deletions
Loading…
Add table
Add a link
Reference in a new issue