Message ID | 200812101740.45046.adetsch@br.ibm.com |
---|---|
State | RFC |
Headers | show |
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, mutex_lock(&gang->mutex); - 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;
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(-)