[PATCH 4/4] UBUNTU: xen: Do not call pgd_list_del in pgd_dtor for Xen

Stefan Bader stefan.bader at canonical.com
Wed Jun 22 13:42:51 UTC 2011


The Xen modifications add code to remove the pgd from the list as soon
as it is freed in pgd_free.

BugLink: http://bugs.launchpad.net/bugs/705562

Signed-off-by: Stefan Bader <stefan.bader at canonical.com>
---
 arch/x86/mm/pgtable_32-xen.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/arch/x86/mm/pgtable_32-xen.c b/arch/x86/mm/pgtable_32-xen.c
index 49e28e7..d8bc211 100644
--- a/arch/x86/mm/pgtable_32-xen.c
+++ b/arch/x86/mm/pgtable_32-xen.c
@@ -290,15 +290,20 @@ static void pgd_ctor(void *pgd)
 
 static void pgd_dtor(void *pgd)
 {
+#ifndef CONFIG_XEN
 	unsigned long flags; /* can be called from interrupt context */
+#endif
 
 	if (SHARED_KERNEL_PMD)
 		return;
 
+#ifndef CONFIG_XEN
+	/* This is done in pgd_free in the Xen case. */
 	paravirt_release_pd(__pa(pgd) >> PAGE_SHIFT);
 	spin_lock_irqsave(&pgd_lock, flags);
 	pgd_list_del(pgd);
 	spin_unlock_irqrestore(&pgd_lock, flags);
+#endif
 
 	pgd_test_and_unpin(pgd);
 }
-- 
1.7.4.1





More information about the kernel-team mailing list