Skip to content
Commit 8d5636fb authored by Jeremy Kerr's avatar Jeremy Kerr
Browse files

powerpc/spufs: reference context while dropping state mutex in scheduler



Based on an original patch from Christoph Hellwig <hch@lst.de>.

Currently, there is a possible reference-after-free in the spusched
code - contexts may be freed after we have released their state_mutex
in spusched_tick and find_victim.

This change takes a reference to the context before releasing the
mutex, so that the context doesn't get destroyed.

Signed-off-by: default avatarJeremy Kerr <jk@ozlabs.org>
parent d9dd421f
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment