diff options
author | Benjamin LaHaise <bcrl@kvack.org> | 2005-07-12 16:58:22 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-07-12 19:01:01 -0400 |
commit | c40504e87e28c52258458a53fefcd63f58e11a42 (patch) | |
tree | 6801c0867e480d80e4bd889662c7bd04f4075e8f /include/asm-um | |
parent | 8b8a9da525c592f129ace454c4d82a80b122827a (diff) |
[PATCH] uml: tlb flushing fix
This patch fixes a fairly serious tlb flushing bug that makes aio use under
uml very unreliable -- SEGVs, Oops and panic()s occur as a result of stale
tlb entires being used by uml when aio switches mms due to the fact that
uml does not implement the activate_mm() hook. This patch introduces a
simple but correct approach (read: hammer) for implementing activate_mm()
in uml by doing a force_flush_all() if the new mm is different from old.
With this patch in place, uml is able to succeed at the aio test case that
was randomly faulting for me before.
Cc: Jeff Dike <jdike@addtoit.com>
Cc: <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-um')
-rw-r--r-- | include/asm-um/mmu_context.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/asm-um/mmu_context.h b/include/asm-um/mmu_context.h index 7529c9c853dd..095bb627b96a 100644 --- a/include/asm-um/mmu_context.h +++ b/include/asm-um/mmu_context.h | |||
@@ -16,8 +16,12 @@ | |||
16 | 16 | ||
17 | #define deactivate_mm(tsk,mm) do { } while (0) | 17 | #define deactivate_mm(tsk,mm) do { } while (0) |
18 | 18 | ||
19 | extern void force_flush_all(void); | ||
20 | |||
19 | static inline void activate_mm(struct mm_struct *old, struct mm_struct *new) | 21 | static inline void activate_mm(struct mm_struct *old, struct mm_struct *new) |
20 | { | 22 | { |
23 | if (old != new) | ||
24 | force_flush_all(); | ||
21 | } | 25 | } |
22 | 26 | ||
23 | static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, | 27 | static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, |