Skip to content

Commit c40504e

Browse files
bcrlLinus Torvalds
authored andcommitted
[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>
1 parent 8b8a9da commit c40504e

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎include/asm-um/mmu_context.h‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,12 @@
1616

1717
#define deactivate_mm(tsk,mm) do { } while (0)
1818

19+
extern void force_flush_all(void);
20+
1921
static inline void activate_mm(struct mm_struct *old, struct mm_struct *new)
2022
{
23+
if (old != new)
24+
force_flush_all();
2125
}
2226

2327
static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,

0 commit comments

Comments
 (0)