From 3b35b10b4e18d865eb10917e7af06595b6cc161c Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Thu, 8 Jan 2009 16:49:15 -0800 Subject: [PATCH] another .27 patch --- ...sc-disable-up-optimized-flush_tlb_mm.patch | 40 +++++++++++++++++++ queue-2.6.27/series | 1 + 2 files changed, 41 insertions(+) create mode 100644 queue-2.6.27/parisc-disable-up-optimized-flush_tlb_mm.patch diff --git a/queue-2.6.27/parisc-disable-up-optimized-flush_tlb_mm.patch b/queue-2.6.27/parisc-disable-up-optimized-flush_tlb_mm.patch new file mode 100644 index 00000000000..a64875d3fca --- /dev/null +++ b/queue-2.6.27/parisc-disable-up-optimized-flush_tlb_mm.patch @@ -0,0 +1,40 @@ +From 5289f46b9de04bde181d833d48df9671b69c4b08 Mon Sep 17 00:00:00 2001 +From: Kyle McMartin +Date: Tue, 23 Dec 2008 08:44:30 -0500 +Subject: parisc: disable UP-optimized flush_tlb_mm + +From: Kyle McMartin + +commit 5289f46b9de04bde181d833d48df9671b69c4b08 upstream. + +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: James Bottomley +Tested-by: Helge Deller +Signed-off-by: Kyle McMartin +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + include/asm-parisc/tlbflush.h | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +--- a/include/asm-parisc/tlbflush.h ++++ b/include/asm-parisc/tlbflush.h +@@ -44,9 +44,12 @@ static inline void flush_tlb_mm(struct m + { + BUG_ON(mm == &init_mm); /* Should never happen */ + +-#ifdef CONFIG_SMP ++#if 1 || defined(CONFIG_SMP) + flush_tlb_all(); + #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->context != 0) + free_sid(mm->context); diff --git a/queue-2.6.27/series b/queue-2.6.27/series index bc00cc18f83..79f6a77866d 100644 --- a/queue-2.6.27/series +++ b/queue-2.6.27/series @@ -13,3 +13,4 @@ scsi-ibmvstgt-move-crq_queue_create-to-the-end-of-initialization.patch scsi-aacraid-disable-dell-percraid-quirk-on-adaptec-2200s-and-2120s.patch cciss-fix-problem-that-deleting-multiple-logical-drives-could-cause-a-panic.patch alsa-hda-add-missing-terminators-in-patch_sigmatel.c.patch +parisc-disable-up-optimized-flush_tlb_mm.patch -- 2.47.3