aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuke Browning <lukebr@linux.vnet.ibm.com>2008-05-12 10:36:59 -0400
committerPaul Mackerras <paulus@samba.org>2008-05-15 06:47:17 -0400
commit08fcf1d61193d7b7779aa6d7388535e26e064a0b (patch)
tree8f0370b527405ef624e5bc6b40e513c342236c62
parentbfd123bf91704b88093673e615cc93329f820ab4 (diff)
[POWERPC] spufs: Fix pointer reference in find_victim
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>
-rw-r--r--arch/powerpc/platforms/cell/spufs/sched.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c
index 2e411f23462b..745dd51ec37f 100644
--- a/arch/powerpc/platforms/cell/spufs/sched.c
+++ b/arch/powerpc/platforms/cell/spufs/sched.c
@@ -659,7 +659,7 @@ static struct spu *find_victim(struct spu_context *ctx)
659 659
660 victim->stats.invol_ctx_switch++; 660 victim->stats.invol_ctx_switch++;
661 spu->stats.invol_ctx_switch++; 661 spu->stats.invol_ctx_switch++;
662 if (test_bit(SPU_SCHED_SPU_RUN, &ctx->sched_flags)) 662 if (test_bit(SPU_SCHED_SPU_RUN, &victim->sched_flags))
663 spu_add_to_rq(victim); 663 spu_add_to_rq(victim);
664 664
665 mutex_unlock(&victim->state_mutex); 665 mutex_unlock(&victim->state_mutex);