]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc: Fix deadlock in icswx code
authorAnton Blanchard <anton@samba.org>
Wed, 14 Sep 2011 09:43:15 +0000 (09:43 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Tue, 20 Sep 2011 05:53:23 +0000 (15:53 +1000)
commit47b5e0ef1738561b39a2d7e7af1d4e405fab6da3
treecade05d9d67d3c6c421f46012961a46dacae5d70
parent9489a11123378b763fc9d98450ed3383a437bcd5
powerpc: Fix deadlock in icswx code

The icswx code introduced an A-B B-A deadlock:

     CPU0                    CPU1
     ----                    ----
lock(&anon_vma->mutex);
                             lock(&mm->mmap_sem);
                             lock(&anon_vma->mutex);
lock(&mm->mmap_sem);

Instead of using the mmap_sem to keep mm_users constant, take the
page table spinlock.

Signed-off-by: Anton Blanchard <anton@samba.org>
Cc: <stable@kernel.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/mm/mmu_context_hash64.c