[Cbe-oss-dev] [PATCH] spufs: fix SPU runqueue corruption
Arnd Bergmann
arnd at arndb.de
Thu May 10 00:23:53 EST 2007
On Wednesday 09 May 2007, Arnd Bergmann 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!
Actually, I just remember that Luke Browning has already provided a better
fix for this bug and we have merged that in 2.6.22-rc, see:
http://patchwork.ozlabs.org/cbe-oss-dev/patch?id=10598
Arnd <><
More information about the cbe-oss-dev
mailing list