From: Benjamin LaHaise <bcrl@kvack.org>
To: Jeff Dike <jdike@addtoit.com>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] uml-v2.6.12-bcrl-fix-tlb.diff
Date: Tue, 5 Jul 2005 14:40:26 -0400 [thread overview]
Message-ID: <20050705184026.GA21739@kvack.org> (raw)
Hello all,
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.
-ben
diff -purN 60_pipe_aio/include/asm-um/mmu_context.h test.diff/include/asm-um/mmu_context.h
--- 60_pipe_aio/include/asm-um/mmu_context.h 2004-12-24 16:34:57.000000000 -0500
+++ test.diff/include/asm-um/mmu_context.h 2005-07-05 14:38:34.569235552 -0400
@@ -14,8 +14,12 @@
#define deactivate_mm(tsk,mm) do { } while (0)
+extern void force_flush_all(void);
+
static inline void activate_mm(struct mm_struct *old, struct mm_struct *new)
{
+ if (old != new)
+ force_flush_all();
}
extern void switch_mm_skas(int mm_fd);
reply other threads:[~2005-07-05 18:40 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050705184026.GA21739@kvack.org \
--to=bcrl@kvack.org \
--cc=jdike@addtoit.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox