aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc/include/asm
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-06-02 18:53:37 +0000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-06-09 16:43:04 +1000
commitb46b6942b39e577fe3ef1af928cd927864011247 (patch)
tree8eea7316ac79fae34ee7fdbccc580fbac1589ff3 /arch/powerpc/include/asm
parent3035c8634f0538a0c6946e3191bb6c9284b63798 (diff)
powerpc/mm: Fix a AB->BA deadlock scenario with nohash MMU context lock
The MMU context_lock can be taken from switch_mm() while the rq->lock is held. The rq->lock can also be taken from interrupts, thus if we get interrupted in destroy_context() with the context lock held and that interrupt tries to take the rq->lock, there's a possible deadlock scenario with another CPU having the rq->lock and calling switch_mm() which takes our context lock. The fix is to always ensure interrupts are off when taking our context lock. The switch_mm() path is already good so this fixes the destroy_context() path. While at it, turn the context lock into a new style spinlock. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/include/asm')
0 files changed, 0 insertions, 0 deletions