diff mbox series

[4/6] x86/mem-paging: add minimal lock order enforcement to p2m_mem_paging_prep()

Message ID e0609729-0a07-6f67-f278-3809ec92dd83@suse.com (mailing list archive)
State Superseded
Headers show
Series x86/mem-paging: misc cleanup | expand

Commit Message

Jan Beulich April 16, 2020, 3:46 p.m. UTC
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 <jbeulich@suse.com>
diff mbox series

Patch

--- 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;