Re: [PATCH v2 2/9] KVM: Introduce kvm_get_kvm_safe()

From: Paolo Bonzini
Date: Mon Jul 26 2021 - 09:43:16 EST


On 25/06/21 17:32, Peter Xu wrote:
- /* The debugfs files are a reference to the kvm struct which
- * is still valid when kvm_destroy_vm is called.
- * To avoid the race between open and the removal of the debugfs
- * directory we test against the users count.
- */
- if (!refcount_inc_not_zero(&stat_data->kvm

Better keep the comment here (but nothing to do on your part).

Paolo