]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: mmu_notifiers release method
authorMarcelo Tosatti <mtosatti@redhat.com>
Wed, 10 Dec 2008 20:23:26 +0000 (21:23 +0100)
committerAvi Kivity <avi@redhat.com>
Sun, 15 Feb 2009 00:47:35 +0000 (02:47 +0200)
commitc0aa0d033c067e6e23a2525f2985603d68e4de0b
tree55acee5d8e3c51f09f44ccfcdd631590819b949d
parentd39e4fa0bf59dcb68023ff1e8a4b16d51ea47180
KVM: mmu_notifiers release method

The destructor for huge pages uses the backing inode for adjusting
hugetlbfs accounting.

Hugepage mappings are destroyed by exit_mmap, after
mmu_notifier_release, so there are no notifications through
unmap_hugepage_range at this point.

The hugetlbfs inode can be freed with pages backed by it referenced
by the shadow. When the shadow releases its reference, the huge page
destructor will access a now freed inode.

Implement the release operation for kvm mmu notifiers to release page
refs before the hugetlbfs inode is gone.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
virt/kvm/kvm_main.c