Re: [PATCH v3 4/6] KVM: Pass the name of the VM fd to kvm_create_vm_debugfs()

Sean Christopherson
2022-08-05T19:20:43Z

On Wed, Jul 20, 2022, Oliver Upton wrote:
> From: Oliver Upton <oupton@google.com>
>
> 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.

One last whine session,

kvm_create_vm_debugfs() to guard against attempts to consume the fd
before it is installed.

> Suggested-by: Sean Christopherson <seanjc@google.com>
> Signed-off-by: Oliver Upton <oupton@google.com>
> ---

Reviewed-by: Sean Christopherson <seanjc@google.com>