KVM: MMU: handle n_free_mmu_pages > n_alloc_mmu_pages in kvm_mmu_change_mmu_pages
authorMarcelo Tosatti <mtosatti@redhat.com>
Wed, 22 Jul 2009 16:05:49 +0000 (13:05 -0300)
committerAvi Kivity <avi@redhat.com>
Wed, 5 Aug 2009 10:59:43 +0000 (13:59 +0300)
kvm_mmu_change_mmu_pages mishandles the case where n_alloc_mmu_pages is
smaller then n_free_mmu_pages, by not checking if the result of
the subtraction is negative.

Its a valid condition which can happen if a large number of pages has
been recently freed.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>

No differences found