[PATCH 05/13] spufs fix spu_acquire_runnable error path

From: Arnd Bergmann
Date: Wed Jan 04 2006 - 14:56:23 EST


When spu_activate fails in spu_acquire_runnable, the
state must still be SPU_STATE_SAVED, we were
incorrectly setting it to SPU_STATE_RUNNABLE.

Signed-off-by: Arnd Bergmann <arndb@xxxxxxxxxx>

Index: linux-2.6.15-rc/arch/powerpc/platforms/cell/spufs/context.c
===================================================================
--- linux-2.6.15-rc.orig/arch/powerpc/platforms/cell/spufs/context.c
+++ linux-2.6.15-rc/arch/powerpc/platforms/cell/spufs/context.c
@@ -132,10 +132,10 @@ int spu_acquire_runnable(struct spu_cont

if (ctx->state == SPU_STATE_SAVED) {
ret = spu_activate(ctx, 0);
+ if (ret)
+ goto out;
ctx->state = SPU_STATE_RUNNABLE;
}
- if (ret)
- goto out;

downgrade_write(&ctx->state_sema);
/* On success, we return holding the lock */

--

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/