]> git.baikalelectronics.ru Git - kernel.git/commit
kvm: selftests: ensure vcpu file is released
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 26 Jul 2018 11:02:24 +0000 (13:02 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 6 Aug 2018 15:32:04 +0000 (17:32 +0200)
commitc6d26a6429d6214b62642e00d5fa390a425a787d
treea5a80f9ca4d173e98815abdafd53c2feb777f61a
parentd2d7cc6fb8f26ea4e0db23d49d9f72f0ca9d48c8
kvm: selftests: ensure vcpu file is released

The selftests were not munmap-ing the kvm_run area from the vcpu file descriptor.
The result was that kvm_vcpu_release was not called and a reference was left in the
parent "struct kvm".  Ultimately this was visible in the upcoming state save/restore
test as an error when KVM attempted to create a duplicate debugfs entry.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tools/testing/selftests/kvm/lib/kvm_util.c