]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/spufs: Fix possible scheduling of a context to multiple SPEs
authorAndre Detsch <adetsch@br.ibm.com>
Thu, 4 Sep 2008 21:16:27 +0000 (21:16 +0000)
committerJeremy Kerr <jk@ozlabs.org>
Sun, 7 Sep 2008 23:44:43 +0000 (09:44 +1000)
commit23b8a5177d89eee2d2271ee7fc71904deed25483
tree302034680d5c7217c28d3b7dff025bd73eeee8c4
parente3475c9956fbdf0d060a3c9005f28bc706b06efd
powerpc/spufs: Fix possible scheduling of a context to multiple SPEs

We currently have a race when scheduling a context to a SPE -
after we have found a runnable context in spusched_tick, the same
context may have been scheduled by spu_activate().

This may result in a panic if we try to unschedule a context that has
been freed in the meantime.

This change exits spu_schedule() if the context has already been
scheduled, so we don't end up scheduling it twice.

Signed-off-by: Andre Detsch <adetsch@br.ibm.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
arch/powerpc/platforms/cell/spufs/sched.c