From: Jeremy Kerr Date: Tue, 26 Feb 2008 02:31:42 +0000 (+1100) Subject: [POWERPC] spufs: fix context destruction during psmap fault X-Git-Tag: v2.6.25-rc4~120^2~1^2~6 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d58831375d68a3bd39d5ebab9eca711fbb4ee108;p=pandora-kernel.git [POWERPC] spufs: fix context destruction during psmap fault We have a small window where a spu context may be destroyed while we're servicing a page fault (from another thread) to the context's problem state mapping. After we up_read() the mmap_sem, it's possible that the context is destroyed by its owning thread, and so the later references to ctx are invalid. This can maifest as a deadlock on the (now free()-ed) context state mutex. This change adds a reference to the context before we release the mmap_sem, so that the context cannot be destroyed. Signed-off-by: Jeremy Kerr --- Reading git-diff-tree failed