]> err.no Git - linux-2.6/commit
KVM: Fix gfn_to_page() acquiring mmap_sem twice
authorAnthony Liguori <aliguori@us.ibm.com>
Mon, 29 Oct 2007 20:15:20 +0000 (15:15 -0500)
committerAvi Kivity <avi@qumranet.com>
Wed, 30 Jan 2008 15:52:58 +0000 (17:52 +0200)
commitaab61cc0d28f6fab0c2c9137d95dea54c7dbcf46
tree66352cc8d0791b83f9b1435465bc35c3126c4dad
parentf78e0e2ee498e8f847500b565792c7d7634dcf54
KVM: Fix gfn_to_page() acquiring mmap_sem twice

KVM's nopage handler calls gfn_to_page() which acquires the mmap_sem when
calling out to get_user_pages().  nopage handlers are already invoked with the
mmap_sem held though.  Introduce a __gfn_to_page() for use by the nopage
handler which requires the lock to already be held.

This was noticed by tglx.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
drivers/kvm/kvm_main.c