[Cbe-oss-dev] [PATCH] spusched: extend list_mutex coverage
Christoph Hellwig
hch at lst.de
Thu Jul 24 05:36:13 EST 2008
On Wed, Jul 23, 2008 at 09:16:48PM +1000, Jeremy Kerr wrote:
> Christoph,
>
> > In both cases we take list_mutex check for spu->ctx, the unlock it
> > <-- race happens here --> then take the state_mutex.
>
> Sure, but:
>
> * in find_victim() we re-check victim->ctx after taking the
> victim's state_mutex; and
Stable doesn't only mean it's the same, it also implies that it's
still there. Without the list_mutex there is no guarantee victim
hasn't been freed in the meantime. The same also applies to the
scheduler thread.
More information about the cbe-oss-dev
mailing list