x86 shadow: Re-init per-page spinlock before freeing p2m pages.
authorKeir Fraser <keir.fraser@citrix.com>
Wed, 16 Jul 2008 10:25:06 +0000 (11:25 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Wed, 16 Jul 2008 10:25:06 +0000 (11:25 +0100)
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen/arch/x86/mm/shadow/common.c

index 0a9943560115880f59ae213092769dc6a91a9b27..57baa276551df0fc3309360f432c0ec203f1ecd9 100644 (file)
@@ -1676,6 +1676,9 @@ shadow_free_p2m_page(struct domain *d, struct page_info *pg)
     /* Free should not decrement domain's total allocation, since 
      * these pages were allocated without an owner. */
     page_set_owner(pg, NULL); 
+#if defined(__x86_64__)
+    spin_lock_init(&pg->lock);
+#endif
     free_domheap_pages(pg, 0);
     d->arch.paging.shadow.p2m_pages--;
     perfc_decr(shadow_alloc_count);