Commit 5289f46b authored by Kyle McMartin's avatar Kyle McMartin Committed by Linus Torvalds

parisc: disable UP-optimized flush_tlb_mm

flush_tlb_mm's "optimized" uniprocessor case of allocating a new
context for userspace is exposing a race where we can suddely return
to a syscall with the protection id and space id out of sync, trapping
on the next userspace access.
Debugged-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
Tested-by: default avatarHelge Deller <deller@gmx.de>
Signed-off-by: default avatarKyle McMartin <kyle@mcmartin.ca>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 8960223d
...@@ -44,9 +44,12 @@ static inline void flush_tlb_mm(struct mm_struct *mm) ...@@ -44,9 +44,12 @@ static inline void flush_tlb_mm(struct mm_struct *mm)
{ {
BUG_ON(mm == &init_mm); /* Should never happen */ BUG_ON(mm == &init_mm); /* Should never happen */
#ifdef CONFIG_SMP #if 1 || defined(CONFIG_SMP)
flush_tlb_all(); flush_tlb_all();
#else #else
/* FIXME: currently broken, causing space id and protection ids
* to go out of sync, resulting in faults on userspace accesses.
*/
if (mm) { if (mm) {
if (mm->context != 0) if (mm->context != 0)
free_sid(mm->context); free_sid(mm->context);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment