--- linux/kernel/sched.c.orig Mon Jan 24 12:15:41 2000 +++ linux/kernel/sched.c Mon Jan 24 12:16:43 2000 @@ -412,6 +412,8 @@ static inline void __schedule_tail(struct task_struct *prev) { #ifdef __SMP__ + if (!prev->mm) + prev->active_mm = NULL; if ((prev->state == TASK_RUNNING) && (prev != idle_task(smp_processor_id()))) { unsigned long flags; @@ -586,10 +588,8 @@ switch_mm(oldmm, mm, next, this_cpu); } - if (!prev->mm) { - prev->active_mm = NULL; + if (!prev->mm) mmdrop(oldmm); - } } /* --- linux/include/asm-i386/pgtable.h.orig Mon Jan 24 12:10:19 2000 +++ linux/include/asm-i386/pgtable.h Mon Jan 24 12:10:33 2000 @@ -48,8 +48,8 @@ "mov %2, %%cr3; # flush TLB \n" \ "mov %1, %%cr4; # turn PGE back on \n" \ : \ - : "r" (mmu_cr4_features), \ - "r" (mmu_cr4_features & ~X86_CR4_PGE), \ + : "r" (mmu_cr4_features & ~X86_CR4_PGE), \ + "r" (mmu_cr4_features), \ "r" (__pa(current->active_mm->pgd)) \ : "memory"); \ } while (0)