From: Thomas Gleixner Date: Tue, 29 Nov 2005 15:57:17 +0000 (+0100) Subject: [JFFS2] Fix the slab cache constructor of 'struct jffs2_inode_info' objects. X-Git-Tag: v2.6.15-rc4~4^2~20^2~9 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=21eeb7aa116b1f59fc23339521173cbb13e57f1a;p=pandora-kernel.git [JFFS2] Fix the slab cache constructor of 'struct jffs2_inode_info' objects. JFFS2 initialize f->sem mutex as "locked" in the slab constructor which is a bug. Objects are freed with unlocked f->sem mutex. So, when they allocated again, f->sem is unlocked because the slab cache constructor is not called for them. The constructor is called only once when memory pages are allocated for objects (namely, when the slab layer allocates new slabs). So, sometimes 'struct jffs2_inode_info' are allocated with unlocked f->sem, sometimes with locked. This is a bug. Instead, initialize f->sem as unlocked in the constructor. I.e., in the "constructed" state f->sem must be unlocked. From: Keijiro Yano Acked-by: Artem B. Bityutskiy Signed-off-by: Thomas Gleixner --- Reading git-diff-tree failed