From: Jeremy Kerr Date: Fri, 16 Nov 2007 02:32:23 +0000 (+1100) Subject: [POWERPC] spufs: Fix context destroy vs /spu readdir race X-Git-Tag: v2.6.24-rc4~109^2~7 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c443acab2eebf12dce7e78fe29e76786f55ad1be;p=pandora-kernel.git [POWERPC] spufs: Fix context destroy vs /spu readdir race We can currently cause an oops by repeatedly creating and destroying contexts, while doing getdents() calls on the "/spu" directory. This is due to the context's top-level dentry remaining hashed while the context is being destroyed. Fix this by unhashing the context's dentry with the dentry->d_inode->i_mutex held. This way, we'll hit the check for d_unhashed in dentry_readdir, and won't be included in the list of subdirs for /spu. test: spufs-testsuite:tests/01-spu_create/07-destroy-vs-readdir-race Signed-off-by: Jeremy Kerr Signed-off-by: Paul Mackerras --- Reading git-diff-tree failed