]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: MMU: avoid pte_list_desc running out in kvm_mmu_pte_write
authorXiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Thu, 22 Sep 2011 08:53:17 +0000 (16:53 +0800)
committerAvi Kivity <avi@redhat.com>
Tue, 27 Dec 2011 09:16:47 +0000 (11:16 +0200)
commitc1f40c8983412a0a89568b3ad0864bb13d1fbe14
tree1b01eb0b666a8990366c601d96e7d1083730ae28
parent884830514587671846eab132e53e0bd1d9c3eec7
KVM: MMU: avoid pte_list_desc running out in kvm_mmu_pte_write

kvm_mmu_pte_write is unsafe since we need to alloc pte_list_desc in the
function when spte is prefetched, unfortunately, we can not know how many
spte need to be prefetched on this path, that means we can use out of the
free  pte_list_desc object in the cache, and BUG_ON() is triggered, also some
path does not fill the cache, such as INS instruction emulated that does not
trigger page fault

Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/kvm/mmu.c