Skip to content

Commit

Permalink
[POWERPC] spufs: Fix pointer reference in find_victim
Browse files Browse the repository at this point in the history
If victim (not ctx) is in spu_run, add victim to rq.

Signed-off-by: Luke Browning <lukebrowning@us.ibm.com>
Acked-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
  • Loading branch information
Luke Browning authored and Paul Mackerras committed May 15, 2008
1 parent bfd123b commit 08fcf1d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/powerpc/platforms/cell/spufs/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,7 @@ static struct spu *find_victim(struct spu_context *ctx)

victim->stats.invol_ctx_switch++;
spu->stats.invol_ctx_switch++;
if (test_bit(SPU_SCHED_SPU_RUN, &ctx->sched_flags))
if (test_bit(SPU_SCHED_SPU_RUN, &victim->sched_flags))
spu_add_to_rq(victim);

mutex_unlock(&victim->state_mutex);
Expand Down

0 comments on commit 08fcf1d

Please sign in to comment.