Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Ubuntu Kernel Team (http://www.linux-archive.org/ubuntu-kernel-team/)
-   -   UBUNTU: xen: Do not call pgd_list_del in pgd_dtor for Xen (http://www.linux-archive.org/ubuntu-kernel-team/542822-ubuntu-xen-do-not-call-pgd_list_del-pgd_dtor-xen.html)

Stefan Bader 06-22-2011 01:42 PM

UBUNTU: xen: Do not call pgd_list_del in pgd_dtor for Xen
 
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@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


--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team


All times are GMT. The time now is 01:36 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.