[kernel] r17221 - in dists/squeeze/linux-2.6/debian: . patches/features/all/xen patches/series

Ian Campbell ijc-guest at alioth.debian.org
Wed Apr 13 07:46:53 UTC 2011


Author: ijc-guest
Date: Wed Apr 13 07:46:37 2011
New Revision: 17221

Log:
[xen] backport fixes to vmalloc_sync_all (Closes: #614400)

Added:
   dists/squeeze/linux-2.6/debian/patches/features/all/xen/vmalloc-eagerly-clear-ptes-on-vunmap.patch
   dists/squeeze/linux-2.6/debian/patches/features/all/xen/x86-mm-Fix-incorrect-data-type-in-vmalloc_sync_all.patch
   dists/squeeze/linux-2.6/debian/patches/features/all/xen/x86-mm-Fix-pgd_lock-deadlock.patch
   dists/squeeze/linux-2.6/debian/patches/features/all/xen/x86-mm-Hold-mm-page_table_lock-while-doing-vmalloc_s.patch
   dists/squeeze/linux-2.6/debian/patches/series/34-extra
      - copied, changed from r17213, dists/squeeze/linux-2.6/debian/patches/series/32-extra
Deleted:
   dists/squeeze/linux-2.6/debian/patches/series/32-extra
Modified:
   dists/squeeze/linux-2.6/debian/changelog

Modified: dists/squeeze/linux-2.6/debian/changelog
==============================================================================
--- dists/squeeze/linux-2.6/debian/changelog	Wed Apr 13 04:37:19 2011	(r17220)
+++ dists/squeeze/linux-2.6/debian/changelog	Wed Apr 13 07:46:37 2011	(r17221)
@@ -4,6 +4,9 @@
   * usb-audio: Reduce packet size for some buggy USB MIDI devices
     (Closes: #617743)
 
+  [ Ian Campbell ]
+  * [xen] backport fixes to vmalloc_sync_all (Closes: #614400)
+
  -- Ben Hutchings <ben at decadent.org.uk>  Fri, 08 Apr 2011 01:13:01 +0100
 
 linux-2.6 (2.6.32-33) stable; urgency=high

Added: dists/squeeze/linux-2.6/debian/patches/features/all/xen/vmalloc-eagerly-clear-ptes-on-vunmap.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/squeeze/linux-2.6/debian/patches/features/all/xen/vmalloc-eagerly-clear-ptes-on-vunmap.patch	Wed Apr 13 07:46:37 2011	(r17221)
@@ -0,0 +1,67 @@
+From a8bf92faf72dba6e0dd2130256cb81c3e68f672b Mon Sep 17 00:00:00 2001
+From: Jeremy Fitzhardinge <jeremy.fitzhardinge at citrix.com>
+Date: Mon, 29 Nov 2010 11:35:04 -0800
+Subject: [PATCH] vmalloc: eagerly clear ptes on vunmap
+
+When unmapping a region in the vmalloc space, clear the ptes immediately.
+There's no point in deferring this because there's no amortization
+benefit.
+
+The TLBs are left dirty, and they are flushed lazily to amortize the
+cost of the IPIs.
+
+This specific motivation for this patch is a regression since 2.6.36 when
+using NFS under Xen, triggered by the NFS client's use of vm_map_ram()
+introduced in 56e4ebf877b6043c289bda32a5a7385b80c17dee.  XFS also uses
+vm_map_ram() and could cause similar problems.
+
+Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge at citrix.com>
+Cc: Nick Piggin <npiggin at kernel.dk>
+---
+ mm/vmalloc.c |    8 +++++---
+ 1 files changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/mm/vmalloc.c b/mm/vmalloc.c
+index 0f551a4..370915c 100644
+--- a/mm/vmalloc.c
++++ b/mm/vmalloc.c
+@@ -547,7 +547,6 @@ static void __purge_vmap_area_lazy(unsigned long *start, unsigned long *end,
+ 			if (va->va_end > *end)
+ 				*end = va->va_end;
+ 			nr += (va->va_end - va->va_start) >> PAGE_SHIFT;
+-			unmap_vmap_area(va);
+ 			list_add_tail(&va->purge_list, &valist);
+ 			va->flags |= VM_LAZY_FREEING;
+ 			va->flags &= ~VM_LAZY_FREE;
+@@ -599,6 +598,8 @@ static void purge_vmap_area_lazy(void)
+  */
+ static void free_unmap_vmap_area_noflush(struct vmap_area *va)
+ {
++	unmap_vmap_area(va);
++
+ 	va->flags |= VM_LAZY_FREE;
+ 	atomic_add((va->va_end - va->va_start) >> PAGE_SHIFT, &vmap_lazy_nr);
+ 	if (unlikely(atomic_read(&vmap_lazy_nr) > lazy_max_pages()))
+@@ -869,8 +870,10 @@ static void vb_free(const void *addr, unsigned long size)
+ 		BUG_ON(vb->free || !list_empty(&vb->free_list));
+ 		spin_unlock(&vb->lock);
+ 		free_vmap_block(vb);
+-	} else
++	} else {
+ 		spin_unlock(&vb->lock);
++		vunmap_page_range((unsigned long)addr, (unsigned long)addr + size);
++	}
+ }
+ 
+ /**
+@@ -913,7 +916,6 @@ void vm_unmap_aliases(void)
+ 
+ 				s = vb->va->va_start + (i << PAGE_SHIFT);
+ 				e = vb->va->va_start + (j << PAGE_SHIFT);
+-				vunmap_page_range(s, e);
+ 				flush = 1;
+ 
+ 				if (s < start)
+-- 
+1.7.4.1
+

Added: dists/squeeze/linux-2.6/debian/patches/features/all/xen/x86-mm-Fix-incorrect-data-type-in-vmalloc_sync_all.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/squeeze/linux-2.6/debian/patches/features/all/xen/x86-mm-Fix-incorrect-data-type-in-vmalloc_sync_all.patch	Wed Apr 13 07:46:37 2011	(r17221)
@@ -0,0 +1,33 @@
+From f01f7c56a1425b9749a99af821e1de334fb64d7e Mon Sep 17 00:00:00 2001
+From: Borislav Petkov <borislav.petkov at amd.com>
+Date: Tue, 19 Oct 2010 22:17:37 +0000
+Subject: [PATCH] x86, mm: Fix incorrect data type in vmalloc_sync_all()
+
+arch/x86/mm/fault.c: In function 'vmalloc_sync_all':
+arch/x86/mm/fault.c:238: warning: assignment makes integer from pointer without a cast
+
+introduced by 617d34d9e5d8326ec8f188c616aa06ac59d083fe.
+
+Signed-off-by: Borislav Petkov <borislav.petkov at amd.com>
+LKML-Reference: <20101020103642.GA3135 at kryptos.osrc.amd.com>
+Signed-off-by: H. Peter Anvin <hpa at linux.intel.com>
+---
+ arch/x86/mm/fault.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
+index 6c27c39..0cdb8d4 100644
+--- a/arch/x86/mm/fault.c
++++ b/arch/x86/mm/fault.c
+@@ -230,7 +230,7 @@ void vmalloc_sync_all(void)
+ 		spin_lock_irqsave(&pgd_lock, flags);
+ 		list_for_each_entry(page, &pgd_list, lru) {
+ 			spinlock_t *pgt_lock;
+-			int ret;
++			pmd_t *ret;
+ 
+ 			pgt_lock = &pgd_page_get_mm(page)->page_table_lock;
+ 
+-- 
+1.7.4.1
+

Added: dists/squeeze/linux-2.6/debian/patches/features/all/xen/x86-mm-Fix-pgd_lock-deadlock.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/squeeze/linux-2.6/debian/patches/features/all/xen/x86-mm-Fix-pgd_lock-deadlock.patch	Wed Apr 13 07:46:37 2011	(r17221)
@@ -0,0 +1,257 @@
+From a79e53d85683c6dd9f99c90511028adc2043031f Mon Sep 17 00:00:00 2001
+From: Andrea Arcangeli <aarcange at redhat.com>
+Date: Wed, 16 Feb 2011 15:45:22 -0800
+Subject: [PATCH] x86/mm: Fix pgd_lock deadlock
+
+It's forbidden to take the page_table_lock with the irq disabled
+or if there's contention the IPIs (for tlb flushes) sent with
+the page_table_lock held will never run leading to a deadlock.
+
+Nobody takes the pgd_lock from irq context so the _irqsave can be
+removed.
+
+Signed-off-by: Andrea Arcangeli <aarcange at redhat.com>
+Acked-by: Rik van Riel <riel at redhat.com>
+Tested-by: Konrad Rzeszutek Wilk <konrad.wilk at oracle.com>
+Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
+Cc: Peter Zijlstra <peterz at infradead.org>
+Cc: Linus Torvalds <torvalds at linux-foundation.org>
+Cc: <stable at kernel.org>
+LKML-Reference: <201102162345.p1GNjMjm021738 at imap1.linux-foundation.org>
+Signed-off-by: Ingo Molnar <mingo at elte.hu>
+[ijc -- adjusted for 2.6.32]
+---
+ arch/x86/mm/fault.c    |    7 +++----
+ arch/x86/mm/init_64.c  |    6 +++---
+ arch/x86/mm/pageattr.c |   18 ++++++++----------
+ arch/x86/mm/pgtable.c  |   11 ++++-------
+ arch/x86/xen/mmu.c     |   10 ++++------
+ 5 files changed, 22 insertions(+), 30 deletions(-)
+
+diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
+index ffc7be1..20e3f87 100644
+--- a/arch/x86/mm/fault.c
++++ b/arch/x86/mm/fault.c
+@@ -229,15 +229,14 @@ void vmalloc_sync_all(void)
+ 	for (address = VMALLOC_START & PMD_MASK;
+ 	     address >= TASK_SIZE && address < FIXADDR_TOP;
+ 	     address += PMD_SIZE) {
+-
+-		unsigned long flags;
+ 		struct page *page;
+ 
+-		spin_lock_irqsave(&pgd_lock, flags);
++		spin_lock(&pgd_lock);
+ 		list_for_each_entry(page, &pgd_list, lru) {
+ 			spinlock_t *pgt_lock;
+ 			pmd_t *ret;
+ 
++			/* the pgt_lock only for Xen */
+ 			pgt_lock = &pgd_page_get_mm(page)->page_table_lock;
+ 
+ 			spin_lock(pgt_lock);
+@@ -247,7 +246,7 @@ void vmalloc_sync_all(void)
+ 			if (!ret)
+ 				break;
+ 		}
+-		spin_unlock_irqrestore(&pgd_lock, flags);
++		spin_unlock(&pgd_lock);
+ 	}
+ }
+ 
+@@ -339,19 +339,18 @@
+ 	     address += PGDIR_SIZE) {
+ 
+ 		const pgd_t *pgd_ref = pgd_offset_k(address);
+-		unsigned long flags;
+ 		struct page *page;
+ 
+ 		if (pgd_none(*pgd_ref))
+ 			continue;
+ 
+-		spin_lock_irqsave(&pgd_lock, flags);
++		spin_lock(&pgd_lock);
+ 		list_for_each_entry(page, &pgd_list, lru) {
+ 			pgd_t *pgd;
+ 			spinlock_t *pgt_lock;
+ 
+ 			pgd = (pgd_t *)page_address(page) + pgd_index(address);
+-
++			/* the pgt_lock only for Xen */
+ 			pgt_lock = &pgd_page_get_mm(page)->page_table_lock;
+ 			spin_lock(pgt_lock);
+ 
+@@ -362,7 +361,7 @@
+ 
+ 			spin_unlock(pgt_lock);
+ 		}
+-		spin_unlock_irqrestore(&pgd_lock, flags);
++		spin_unlock(&pgd_lock);
+ 	}
+ }
+ 
+diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c
+index d343b3c..90825f2 100644
+--- a/arch/x86/mm/pageattr.c
++++ b/arch/x86/mm/pageattr.c
+@@ -57,12 +57,10 @@ static unsigned long direct_pages_count[PG_LEVEL_NUM];
+ 
+ void update_page_count(int level, unsigned long pages)
+ {
+-	unsigned long flags;
+-
+ 	/* Protect against CPA */
+-	spin_lock_irqsave(&pgd_lock, flags);
++	spin_lock(&pgd_lock);
+ 	direct_pages_count[level] += pages;
+-	spin_unlock_irqrestore(&pgd_lock, flags);
++	spin_unlock(&pgd_lock);
+ }
+ 
+ static void split_page_count(int level)
+@@ -394,7 +392,7 @@ static int
+ try_preserve_large_page(pte_t *kpte, unsigned long address,
+ 			struct cpa_data *cpa)
+ {
+-	unsigned long nextpage_addr, numpages, pmask, psize, flags, addr, pfn;
++	unsigned long nextpage_addr, numpages, pmask, psize, addr, pfn;
+ 	pte_t new_pte, old_pte, *tmp;
+ 	pgprot_t old_prot, new_prot;
+ 	int i, do_split = 1;
+@@ -403,7 +401,7 @@ try_preserve_large_page(pte_t *kpte, unsigned long address,
+ 	if (cpa->force_split)
+ 		return 1;
+ 
+-	spin_lock_irqsave(&pgd_lock, flags);
++	spin_lock(&pgd_lock);
+ 	/*
+ 	 * Check for races, another CPU might have split this page
+ 	 * up already:
+@@ -498,14 +496,14 @@ try_preserve_large_page(pte_t *kpte, unsigned long address,
+ 	}
+ 
+ out_unlock:
+-	spin_unlock_irqrestore(&pgd_lock, flags);
++	spin_unlock(&pgd_lock);
+ 
+ 	return do_split;
+ }
+ 
+ static int split_large_page(pte_t *kpte, unsigned long address)
+ {
+-	unsigned long flags, pfn, pfninc = 1;
++	unsigned long pfn, pfninc = 1;
+ 	unsigned int i, level;
+ 	pte_t *pbase, *tmp;
+ 	pgprot_t ref_prot;
+@@ -519,7 +517,7 @@ static int split_large_page(pte_t *kpte, unsigned long address)
+ 	if (!base)
+ 		return -ENOMEM;
+ 
+-	spin_lock_irqsave(&pgd_lock, flags);
++	spin_lock(&pgd_lock);
+ 	/*
+ 	 * Check for races, another CPU might have split this page
+ 	 * up for us already:
+@@ -591,7 +589,7 @@ out_unlock:
+ 	 */
+ 	if (base)
+ 		__free_page(base);
+-	spin_unlock_irqrestore(&pgd_lock, flags);
++	spin_unlock(&pgd_lock);
+ 
+ 	return 0;
+ }
+diff --git a/arch/x86/mm/pgtable.c b/arch/x86/mm/pgtable.c
+index 500242d..0113d19 100644
+--- a/arch/x86/mm/pgtable.c
++++ b/arch/x86/mm/pgtable.c
+@@ -121,14 +121,12 @@ static void pgd_ctor(struct mm_struct *mm, pgd_t *pgd)
+ 
+ static void pgd_dtor(pgd_t *pgd)
+ {
+-	unsigned long flags; /* can be called from interrupt context */
+-
+ 	if (SHARED_KERNEL_PMD)
+ 		return;
+ 
+-	spin_lock_irqsave(&pgd_lock, flags);
++	spin_lock(&pgd_lock);
+ 	pgd_list_del(pgd);
+-	spin_unlock_irqrestore(&pgd_lock, flags);
++	spin_unlock(&pgd_lock);
+ }
+ 
+ /*
+@@ -260,7 +258,6 @@ pgd_t *pgd_alloc(struct mm_struct *mm)
+ {
+ 	pgd_t *pgd;
+ 	pmd_t *pmds[PREALLOCATED_PMDS];
+-	unsigned long flags;
+ 
+ 	pgd = (pgd_t *)__get_free_page(PGALLOC_GFP);
+ 
+@@ -280,12 +277,12 @@ pgd_t *pgd_alloc(struct mm_struct *mm)
+ 	 * respect to anything walking the pgd_list, so that they
+ 	 * never see a partially populated pgd.
+ 	 */
+-	spin_lock_irqsave(&pgd_lock, flags);
++	spin_lock(&pgd_lock);
+ 
+ 	pgd_ctor(mm, pgd);
+ 	pgd_prepopulate_pmd(mm, pgd, pmds);
+ 
+-	spin_unlock_irqrestore(&pgd_lock, flags);
++	spin_unlock(&pgd_lock);
+ 
+ 	return pgd;
+ 
+diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c
+index 5e92b61..f608942 100644
+--- a/arch/x86/xen/mmu.c
++++ b/arch/x86/xen/mmu.c
+@@ -986,10 +986,9 @@ static void xen_pgd_pin(struct mm_struct *mm)
+  */
+ void xen_mm_pin_all(void)
+ {
+-	unsigned long flags;
+ 	struct page *page;
+ 
+-	spin_lock_irqsave(&pgd_lock, flags);
++	spin_lock(&pgd_lock);
+ 
+ 	list_for_each_entry(page, &pgd_list, lru) {
+ 		if (!PagePinned(page)) {
+@@ -998,7 +997,7 @@ void xen_mm_pin_all(void)
+ 		}
+ 	}
+ 
+-	spin_unlock_irqrestore(&pgd_lock, flags);
++	spin_unlock(&pgd_lock);
+ }
+ 
+ /*
+@@ -1099,10 +1098,9 @@ static void xen_pgd_unpin(struct mm_struct *mm)
+  */
+ void xen_mm_unpin_all(void)
+ {
+-	unsigned long flags;
+ 	struct page *page;
+ 
+-	spin_lock_irqsave(&pgd_lock, flags);
++	spin_lock(&pgd_lock);
+ 
+ 	list_for_each_entry(page, &pgd_list, lru) {
+ 		if (PageSavePinned(page)) {
+@@ -1112,7 +1110,7 @@ void xen_mm_unpin_all(void)
+ 		}
+ 	}
+ 
+-	spin_unlock_irqrestore(&pgd_lock, flags);
++	spin_unlock(&pgd_lock);
+ }
+ 
+ void xen_activate_mm(struct mm_struct *prev, struct mm_struct *next)
+-- 
+1.7.4.1
+

Added: dists/squeeze/linux-2.6/debian/patches/features/all/xen/x86-mm-Hold-mm-page_table_lock-while-doing-vmalloc_s.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/squeeze/linux-2.6/debian/patches/features/all/xen/x86-mm-Hold-mm-page_table_lock-while-doing-vmalloc_s.patch	Wed Apr 13 07:46:37 2011	(r17221)
@@ -0,0 +1,134 @@
+From 617d34d9e5d8326ec8f188c616aa06ac59d083fe Mon Sep 17 00:00:00 2001
+From: Jeremy Fitzhardinge <jeremy.fitzhardinge at citrix.com>
+Date: Tue, 21 Sep 2010 12:01:51 -0700
+Subject: [PATCH] x86, mm: Hold mm->page_table_lock while doing vmalloc_sync
+
+Take mm->page_table_lock while syncing the vmalloc region.  This prevents
+a race with the Xen pagetable pin/unpin code, which expects that the
+page_table_lock is already held.  If this race occurs, then Xen can see
+an inconsistent page type (a page can either be read/write or a pagetable
+page, and pin/unpin converts it between them), which will cause either
+the pin or the set_p[gm]d to fail; either will crash the kernel.
+
+vmalloc_sync_all() should be called rarely, so this extra use of
+page_table_lock should not interfere with its normal users.
+
+The mm pointer is stashed in the pgd page's index field, as that won't
+be otherwise used for pgds.
+
+Reported-by: Ian Campbell <ian.cambell at eu.citrix.com>
+Originally-by: Jan Beulich <jbeulich at novell.com>
+LKML-Reference: <4CB88A4C.1080305 at goop.org>
+Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge at citrix.com>
+Signed-off-by: H. Peter Anvin <hpa at linux.intel.com>
+---
+ arch/x86/include/asm/pgtable.h |    2 ++
+ arch/x86/mm/fault.c            |   11 ++++++++++-
+ arch/x86/mm/init_64.c          |    7 +++++++
+ arch/x86/mm/pgtable.c          |   20 +++++++++++++++++---
+ 4 files changed, 36 insertions(+), 4 deletions(-)
+
+diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h
+index 2d0a33b..ada823a 100644
+--- a/arch/x86/include/asm/pgtable.h
++++ b/arch/x86/include/asm/pgtable.h
+@@ -28,6 +28,8 @@ extern unsigned long empty_zero_page[PAGE_SIZE / sizeof(unsigned long)];
+ extern spinlock_t pgd_lock;
+ extern struct list_head pgd_list;
+ 
++extern struct mm_struct *pgd_page_get_mm(struct page *page);
++
+ #ifdef CONFIG_PARAVIRT
+ #include <asm/paravirt.h>
+ #else  /* !CONFIG_PARAVIRT */
+diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
+index caec229..6c27c39 100644
+--- a/arch/x86/mm/fault.c
++++ b/arch/x86/mm/fault.c
+@@ -229,7 +229,16 @@ void vmalloc_sync_all(void)
+ 
+ 		spin_lock_irqsave(&pgd_lock, flags);
+ 		list_for_each_entry(page, &pgd_list, lru) {
+-			if (!vmalloc_sync_one(page_address(page), address))
++			spinlock_t *pgt_lock;
++			int ret;
++
++			pgt_lock = &pgd_page_get_mm(page)->page_table_lock;
++
++			spin_lock(pgt_lock);
++			ret = vmalloc_sync_one(page_address(page), address);
++			spin_unlock(pgt_lock);
++
++			if (!ret)
+ 				break;
+ 		}
+ 		spin_unlock_irqrestore(&pgd_lock, flags);
+@@ -349,11 +349,19 @@
+ 		spin_lock_irqsave(&pgd_lock, flags);
+ 		list_for_each_entry(page, &pgd_list, lru) {
+ 			pgd_t *pgd;
++			spinlock_t *pgt_lock;
++
+ 			pgd = (pgd_t *)page_address(page) + pgd_index(address);
++
++			pgt_lock = &pgd_page_get_mm(page)->page_table_lock;
++			spin_lock(pgt_lock);
++
+ 			if (pgd_none(*pgd))
+ 				set_pgd(pgd, *pgd_ref);
+ 			else
+ 				BUG_ON(pgd_page_vaddr(*pgd) != pgd_page_vaddr(*pgd_ref));
++
++			spin_unlock(pgt_lock);
+ 		}
+ 		spin_unlock_irqrestore(&pgd_lock, flags);
+ 	}
+diff --git a/arch/x86/mm/pgtable.c b/arch/x86/mm/pgtable.c
+index 5c4ee42..c70e57d 100644
+--- a/arch/x86/mm/pgtable.c
++++ b/arch/x86/mm/pgtable.c
+@@ -87,7 +87,19 @@ static inline void pgd_list_del(pgd_t *pgd)
+ #define UNSHARED_PTRS_PER_PGD				\
+ 	(SHARED_KERNEL_PMD ? KERNEL_PGD_BOUNDARY : PTRS_PER_PGD)
+ 
+-static void pgd_ctor(pgd_t *pgd)
++
++static void pgd_set_mm(pgd_t *pgd, struct mm_struct *mm)
++{
++	BUILD_BUG_ON(sizeof(virt_to_page(pgd)->index) < sizeof(mm));
++	virt_to_page(pgd)->index = (pgoff_t)mm;
++}
++
++struct mm_struct *pgd_page_get_mm(struct page *page)
++{
++	return (struct mm_struct *)page->index;
++}
++
++static void pgd_ctor(struct mm_struct *mm, pgd_t *pgd)
+ {
+ 	/* If the pgd points to a shared pagetable level (either the
+ 	   ptes in non-PAE, or shared PMD in PAE), then just copy the
+@@ -105,8 +117,10 @@ static void pgd_ctor(pgd_t *pgd)
+ 	}
+ 
+ 	/* list required to sync kernel mapping updates */
+-	if (!SHARED_KERNEL_PMD)
++	if (!SHARED_KERNEL_PMD) {
++		pgd_set_mm(pgd, mm);
+ 		pgd_list_add(pgd);
++	}
+ }
+ 
+ static void pgd_dtor(pgd_t *pgd)
+@@ -272,7 +286,7 @@ pgd_t *pgd_alloc(struct mm_struct *mm)
+ 	 */
+ 	spin_lock_irqsave(&pgd_lock, flags);
+ 
+-	pgd_ctor(pgd);
++	pgd_ctor(mm, pgd);
+ 	pgd_prepopulate_pmd(mm, pgd, pmds);
+ 
+ 	spin_unlock_irqrestore(&pgd_lock, flags);
+-- 
+1.7.4.1
+

Copied and modified: dists/squeeze/linux-2.6/debian/patches/series/34-extra (from r17213, dists/squeeze/linux-2.6/debian/patches/series/32-extra)
==============================================================================
--- dists/squeeze/linux-2.6/debian/patches/series/32-extra	Fri Apr  8 00:24:56 2011	(r17213, copy source)
+++ dists/squeeze/linux-2.6/debian/patches/series/34-extra	Wed Apr 13 07:46:37 2011	(r17221)
@@ -32,3 +32,7 @@
 + features/all/xen/xen-netback-Drop-GSO-SKBs-which-do-not-have-csum_b.patch featureset=xen
 + features/all/xen/xen-blkback-CVE-2010-3699.patch featureset=xen
 + features/all/xen/xen-do-not-release-any-memory-under-1M-in-domain-0.patch featureset=xen
++ features/all/xen/x86-mm-Hold-mm-page_table_lock-while-doing-vmalloc_s.patch featureset=xen
++ features/all/xen/x86-mm-Fix-incorrect-data-type-in-vmalloc_sync_all.patch featureset=xen
++ features/all/xen/vmalloc-eagerly-clear-ptes-on-vunmap.patch featureset=xen
++ features/all/xen/x86-mm-Fix-pgd_lock-deadlock.patch featureset=xen



More information about the Kernel-svn-changes mailing list