mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-01-16 14:38:49 +00:00
8d5636fbca
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: Jeremy Kerr <jk@ozlabs.org>