diff mbox

(no subject)

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

Commit Message

Andre Detsch Dec. 10, 2008, 7:04 p.m. UTC
From cc28e8a5739924621833e2750af163d336a3e0a3 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:25 -0200
Subject: [PATCH 15/18] powerpc/spufs: Fix position of BUG_ON inside spusched_tick
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Message-Id: <200812101704.25515.adetsch@br.ibm.com>

The old position of the BUG_ON(!spu_gang_runnable(gang))
command was leading to false bug notifications.
The gang might become not runnable when spusched_tick is
about to be called, as there is no lock being hold that
prevents this to happen. It only is a bug if ctx->spu
was not unset during the process.

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


diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c
index be13b19..7b4852f 100644
--- a/arch/powerpc/platforms/cell/spufs/sched.c
+++ b/arch/powerpc/platforms/cell/spufs/sched.c
@@ -1160,11 +1160,11 @@  static noinline int spusched_tick(struct spu_gang *gang,
-	BUG_ON(!spu_gang_runnable(gang));
 	if (!ctx->spu)
 		goto out;
+	BUG_ON(!spu_gang_runnable(gang));
 	if (ctx->flags & SPU_CREATE_NOSCHED)
 		goto out;