diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-05-19 18:56:42 +0200 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-06-09 08:42:21 +0200 |
commit | 3035c8634f0538a0c6946e3191bb6c9284b63798 (patch) | |
tree | 68f81301d2ced6492957c8320a631ad96518bd53 /crypto/xts.c | |
parent | powerpc: Add PTRACE_SINGLEBLOCK support (diff) | |
download | linux-3035c8634f0538a0c6946e3191bb6c9284b63798.tar.xz linux-3035c8634f0538a0c6946e3191bb6c9284b63798.zip |
powerpc/mm: Fix some SMP issues with MMU context handling
This patch fixes a couple of issues that can happen as a result
of steal_context() dropping the context_lock when all possible
PIDs are ineligible for stealing (hopefully an extremely hard to
hit occurence).
This case exposes the possibility of a stale context_mm[] entry
to be seen since destroy_context() doesn't clear it and the free
map isn't re-tested. It also means steal_context() will not notice
a context freed while the lock was help, thus possibly trying to
steal a context when a free one was available.
This fixes it by always returning to the caller from steal_context
when it dropped the lock with a return value that causes the
caller to re-samble the number of free contexts, along with
properly clearing the context_mm[] array for destroyed contexts.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'crypto/xts.c')
0 files changed, 0 insertions, 0 deletions