aboutsummaryrefslogtreecommitdiffstats
path: root/xen/common/grant_table.c
diff options
context:
space:
mode:
authorAndres Lagar-Cavilla <andres@lagarcavilla.org>2012-02-10 16:07:07 +0000
committerAndres Lagar-Cavilla <andres@lagarcavilla.org>2012-02-10 16:07:07 +0000
commit2981fb7d9dcbbe36228042fbf00618bb56ebafea (patch)
tree21e024a9049fee2493626b68116913b83d187025 /xen/common/grant_table.c
parent99af3cd40b6e9fde63daddcec86ee5e6db338d94 (diff)
downloadxen-2981fb7d9dcbbe36228042fbf00618bb56ebafea.tar.gz
xen-2981fb7d9dcbbe36228042fbf00618bb56ebafea.tar.bz2
xen-2981fb7d9dcbbe36228042fbf00618bb56ebafea.zip
Re-order calls to put_gfn() around wait queue invocations
Since we use wait queues to handle potential ring congestion cases, code paths that try to generate a mem event while holding a gfn lock would go to sleep in non-preemptible mode. Most such code paths can be fixed by simply postponing event generation until locks are released. Signed-off-by: Adin Scannell <adin@scannell.ca> Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org> Acked-by: Tim Deegan <tim@xen.org> Committed-by: Tim Deegan <tim@xen.org>
Diffstat (limited to 'xen/common/grant_table.c')
-rw-r--r--xen/common/grant_table.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xen/common/grant_table.c b/xen/common/grant_table.c
index 8a0f38664d..9defa4d74c 100644
--- a/xen/common/grant_table.c
+++ b/xen/common/grant_table.c
@@ -164,8 +164,8 @@ static int __get_paged_frame(unsigned long gfn, unsigned long *frame, int readon
*frame = mfn_x(mfn);
if ( p2m_is_paging(p2mt) )
{
- p2m_mem_paging_populate(rd, gfn);
put_gfn(rd, gfn);
+ p2m_mem_paging_populate(rd, gfn);
rc = GNTST_eagain;
}
} else {