[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] Fix process destruction: we should clear the LDT before calling



ChangeSet 1.1457, 2005/05/08 12:12:14+01:00, kaf24@xxxxxxxxxxxxxxxxxxxx

        Fix process destruction: we should clear the LDT before calling
        destroy_context().
        Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>



 init.c    |    1 +
 pgtable.c |    6 ++----
 2 files changed, 3 insertions(+), 4 deletions(-)


diff -Nru a/linux-2.6.11-xen-sparse/arch/xen/i386/mm/init.c 
b/linux-2.6.11-xen-sparse/arch/xen/i386/mm/init.c
--- a/linux-2.6.11-xen-sparse/arch/xen/i386/mm/init.c   2005-05-08 08:03:04 
-04:00
+++ b/linux-2.6.11-xen-sparse/arch/xen/i386/mm/init.c   2005-05-08 08:03:04 
-04:00
@@ -361,6 +361,7 @@
        make_page_writable(old_pgd);
        __flush_tlb_all();
        free_bootmem(__pa(old_pgd), PAGE_SIZE);
+       init_mm.context.pinned = 1;
 
        kernel_physical_mapping_init(pgd_base);
        remap_numa_kva();
diff -Nru a/linux-2.6.11-xen-sparse/arch/xen/i386/mm/pgtable.c 
b/linux-2.6.11-xen-sparse/arch/xen/i386/mm/pgtable.c
--- a/linux-2.6.11-xen-sparse/arch/xen/i386/mm/pgtable.c        2005-05-08 
08:03:04 -04:00
+++ b/linux-2.6.11-xen-sparse/arch/xen/i386/mm/pgtable.c        2005-05-08 
08:03:04 -04:00
@@ -22,6 +22,7 @@
 #include <asm/tlb.h>
 #include <asm/tlbflush.h>
 #include <asm/io.h>
+#include <asm/mmu_context.h>
 
 #include <asm-xen/foreign_page.h>
 
@@ -480,7 +481,6 @@
 
 void _arch_exit_mmap(struct mm_struct *mm)
 {
-    unsigned int cpu = smp_processor_id();
     struct task_struct *tsk = current;
 
     task_lock(tsk);
@@ -494,9 +494,7 @@
         tsk->active_mm = &init_mm;
         atomic_inc(&init_mm.mm_count);
 
-        cpu_set(cpu, init_mm.cpu_vm_mask);
-        load_cr3(swapper_pg_dir);
-        cpu_clear(cpu, mm->cpu_vm_mask);
+        switch_mm(mm, &init_mm, tsk);
 
         atomic_dec(&mm->mm_count);
         BUG_ON(atomic_read(&mm->mm_count) == 0);

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.