diff options
author | Andre Detsch <adetsch@br.ibm.com> | 2007-09-19 14:38:12 +1000 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-09-19 15:12:16 +1000 |
commit | 36ddbb1380f282b4280c57efdb646dd8647a789f (patch) | |
tree | fbae61d4f858f31ef41631f54d2ab3982f02efb4 /arch/sh64 | |
parent | 8b0d3121a0b2cf91768ecef635e241b6abc3f1da (diff) |
[POWERPC] spufs: Fix race condition on gang->aff_ref_spu
Affinity reference point location (gang->aff_ref_spu) is reset
when the whole gang is descheduled. However, the last member of
a gang can be descheduled while we are trying to schedule another
member of the gang. This was leading to a race condition, and
the code was using gang->aff_ref_spu in an unsafe manner.
By holding the gang->aff_mutex a little bit longer, and increment
gang->aff_sched_count (which controls when gang->aff_ref_spu
should be reset) a little bit earlier, the problem is fixed.
Signed-off-by: Andre Detsch <adetsch@br.ibm.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/sh64')
0 files changed, 0 insertions, 0 deletions