LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] powerpc: fix idr locking in init_new_context
@ 2006-06-27 12:46 Sonny Rao
  0 siblings, 0 replies; only message in thread
From: Sonny Rao @ 2006-06-27 12:46 UTC (permalink / raw)
  To: paulus; +Cc: linuxppc-dev, linux-kernel, anton


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>

--- 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;
        }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-06-27 12:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-27 12:46 [PATCH] powerpc: fix idr locking in init_new_context Sonny Rao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox