diff options
author | Sonny Rao <sonny@burdell.org> | 2006-06-27 16:46:09 +0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-06-29 10:22:46 +0400 |
commit | f86c9747fe1cd72b2c5c6bdf72d17aeb2a3c6cb0 (patch) | |
tree | c32ef71ff0e535a467e428d3d874b65232f76708 /arch/powerpc | |
parent | 975b365895b638a62da55f9fb180b0a71d05874d (diff) | |
download | linux-f86c9747fe1cd72b2c5c6bdf72d17aeb2a3c6cb0.tar.xz |
[POWERPC] Fix idr locking in init_new_context
We always need to serialize accesses to mmu_context_idr.
I hit this bug when testing with a small number of mmu contexts.
Signed-off-by: Sonny Rao <sonny@burdell.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/mm/mmu_context_64.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/powerpc/mm/mmu_context_64.c b/arch/powerpc/mm/mmu_context_64.c index 65d18dca266f..e2051efa09c5 100644 --- a/arch/powerpc/mm/mmu_context_64.c +++ b/arch/powerpc/mm/mmu_context_64.c @@ -44,7 +44,9 @@ again: return err; if (index > MAX_CONTEXT) { + spin_lock(&mmu_context_lock); idr_remove(&mmu_context_idr, index); + spin_unlock(&mmu_context_lock); return -ENOMEM; } |