From: Jeremy Kerr Date: Thu, 14 Aug 2008 04:59:12 +0000 (+1000) Subject: powerpc/spufs: reference context while dropping state mutex in scheduler X-Git-Tag: v2.6.27-rc4~31^2~3^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8d5636fbca202f61fdb808fc9e20c0142291d802;p=pandora-kernel.git powerpc/spufs: reference context while dropping state mutex in scheduler Based on an original patch from Christoph Hellwig . 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 --- Reading git-diff-tree failed