diff mbox

(no subject)

Message ID 200812101904.mBAJ4TZq016705@d24av01.br.ibm.com
State Superseded
Headers show

Commit Message

Andre Detsch Dec. 10, 2008, 7:04 p.m. UTC
From 3b490b0d482a1b79bbd002abbc4ac5545a7bd4ef Mon Sep 17 00:00:00 2001
In-Reply-To: <200812101654.05091.adetsch@br.ibm.com>
References: <200812101654.05091.adetsch@br.ibm.com>
From: Andre Detsch <adetsch@br.ibm.com>
Date: Wed, 10 Dec 2008 17:04:29 -0200
Subject: [PATCH 16/18] powerpc/spufs: Fix double lock on cbe_spu_info[node].list_mutex
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Message-Id: <200812101704.29716.adetsch@br.ibm.com>

put_spu_context cannot be called with the cbe_spu_info[].list_mutex
spin_lock being hold.

Signed-off-by: Andre Detsch <adetsch@br.ibm.com>
---
 arch/powerpc/platforms/cell/spufs/sched.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff mbox

Patch

diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c
index 7b4852f..3163239 100644
--- a/arch/powerpc/platforms/cell/spufs/sched.c
+++ b/arch/powerpc/platforms/cell/spufs/sched.c
@@ -1293,8 +1293,8 @@  static int spusched_thread(void *unused)
 					mutex_unlock(mtx);
 					preempted += spusched_tick(gang, ctx,
 						preempted < maxcontexts);
-					mutex_lock(mtx);
 					put_spu_context(ctx);
+					mutex_lock(mtx);
 					active++;
 				}
 			}