]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: Fix a race condition for usage of is_hwpoison_address()
authorHuang Ying <ying.huang@intel.com>
Tue, 22 Jun 2010 06:23:11 +0000 (14:23 +0800)
committerAvi Kivity <avi@redhat.com>
Sun, 1 Aug 2010 07:47:11 +0000 (10:47 +0300)
commit44dfb496e02f416db9769eeb42dfce2447cac849
treecf29b50e076ba1ddc07d5b1292f243653a2f67a9
parent541558e1340f4d821e97cc4d75e3bc24f788f29f
KVM: Fix a race condition for usage of is_hwpoison_address()

is_hwpoison_address accesses the page table, so the caller must hold
current->mm->mmap_sem in read mode. So fix its usage in hva_to_pfn of
kvm accordingly.

Comment is_hwpoison_address to remind other users.

Reported-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Huang Ying <ying.huang@intel.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
mm/memory-failure.c
virt/kvm/kvm_main.c