[Cbe-oss-dev] [PATCH] spufs: fix SPU runqueue corruption

Arnd Bergmann arnd at arndb.de
Wed May 9 23:32:12 EST 2007


On Tuesday 08 May 2007, Akinobu Mita wrote:
> It is possible that two processes simultaneously try to
> make one SPU context runnable. Then both process is trying to add
> the context to runqueue and break runqueue list.
> 
> For example, one process is blocking at run_spu() and waiting for idle SPU.
> another process is reading its psmap.
> 
> This patch prevents the SPU context which is already in runqueue
> to be queueed runqueue again and check whether the context already
> has been runnable or being destroyed after spu_prio_wait().
> 
> I'm not sure this patch doing right thing to fix. But it prevents
> Oops by runqueue corruption.
> 
> This is reproducible by direct_ps on PS3.
> direct_ps is the sample program in Cell SDK
> (/opt/ibm/cell-sdk/prototype/src/tests/direct_problem_state/direct_ps.c)
> 
> Signed-off-by: Akinobu Mita <mita at fixstars.com>

Looks good to me. I'll add this to my patch series and forward
it upstream. Thanks!

	Arnd <><



More information about the cbe-oss-dev mailing list