aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorSonny Rao <sonny@burdell.org>2006-06-27 08:46:09 -0400
committerPaul Mackerras <paulus@samba.org>2006-06-29 02:22:46 -0400
commitf86c9747fe1cd72b2c5c6bdf72d17aeb2a3c6cb0 (patch)
treec32ef71ff0e535a467e428d3d874b65232f76708 /arch/powerpc
parent975b365895b638a62da55f9fb180b0a71d05874d (diff)
[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.c2
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:
44 return err; 44 return err;
45 45
46 if (index > MAX_CONTEXT) { 46 if (index > MAX_CONTEXT) {
47 spin_lock(&mmu_context_lock);
47 idr_remove(&mmu_context_idr, index); 48 idr_remove(&mmu_context_idr, index);
49 spin_unlock(&mmu_context_lock);
48 return -ENOMEM; 50 return -ENOMEM;
49 } 51 }
50 52