[PATCH 05/13] spufs fix spu_acquire_runnable error path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <[email protected]>

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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux