While full checking is impossible (as the lock is being acquired/ released down the call tree), perform at least a lock level check.
Signed-off-by: Jan Beulich <jbeul...@suse.com> --- a/xen/arch/x86/mm/p2m.c +++ b/xen/arch/x86/mm/p2m.c @@ -1813,6 +1813,7 @@ int p2m_mem_paging_prep(struct domain *d goto out; /* Get a free page */ ret = -ENOMEM; + page_alloc_mm_pre_lock(d); page = alloc_domheap_page(d, 0); if ( unlikely(page == NULL) ) goto out;