Re: bug in __flush_tlb_global() ?

From: Manfred Spraul (manfreds@colorfullife.com)
Date: Sun Jan 30 2000 - 06:53:40 EST


Mikael Pettersson wrote:
>
> I believe there's a bug in the __flush_tlb_global() macro
> added to include/asm-i386/pgtable.h in 2.3.40:
>
> [...]
> : "r" (mmu_cr4_features), \
> "r" (mmu_cr4_features & ~X86_CR4_PGE), \
> "r" (__pa(current->active_mm->pgd)) \
> : "memory"); \
> [...]
> I may be wrong, but it looks to me as if inputs 0 and 1 have been
> swapped. Proposed fix included below.
>
Yes, that's a known bug, but the complete bug list of the tlb flush code
is a bit longer :-(

* parameters swapped.
* current->active_mm can be NULL during thread switch.
* current->mm->cpu_vm_mask is not updated properly during thread switch
if a flush IPI arrives between switch_mm() and switch_to().

The first 2 problems are fixed in Ingo's newest patch, and the third
problem is fixed in my patch that I posted yesterday [and forwarded to
Linus for inclusion in the next kernel]

--
	Manfred

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Jan 31 2000 - 21:00:25 EST