提交 01062465 编写于 作者: A Arnd Bergmann 提交者: Paul Mackerras

[PATCH] spufs fix spu_acquire_runnable error path

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: NArnd Bergmann <arndb@de.ibm.com>
Signed-off-by: NPaul Mackerras <paulus@samba.org>
上级 5ef8224a
......@@ -132,10 +132,10 @@ int spu_acquire_runnable(struct spu_context *ctx)
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 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册