]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: Pass the name of the VM fd to kvm_create_vm_debugfs()
authorOliver Upton <oupton@google.com>
Wed, 20 Jul 2022 09:22:50 +0000 (09:22 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 10 Aug 2022 19:08:28 +0000 (15:08 -0400)
commit7ae74d9e0d7f22ca32dbdf0375daf664ba4b7c7b
tree860c5b87f50397ee11a48dc9218cee342bd8b493
parent4eb053984141bc9ba1aef3ad48b797694bab1df5
KVM: Pass the name of the VM fd to kvm_create_vm_debugfs()

At the time the VM fd is used in kvm_create_vm_debugfs(), the fd has
been allocated but not yet installed. It is only really useful as an
identifier in strings for the VM (such as debugfs).

Treat it exactly as such by passing the string name of the fd to
kvm_create_vm_debugfs(), futureproofing against possible misuse of the
VM fd.

Suggested-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Oliver Upton <oupton@google.com>
Message-Id: <20220720092259.3491733-5-oliver.upton@linux.dev>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
virt/kvm/kvm_main.c