From: Pekka Enberg Date: Tue, 14 Sep 2010 20:21:12 +0000 (+0300) Subject: SLUB: Fix merged slab cache names X-Git-Tag: v2.6.37-rc1~141^2~16 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=84c1cf62465e2fb0a692620dcfeb52323ab03d48;p=pandora-kernel.git SLUB: Fix merged slab cache names As explained by Linus "I'm Proud to be an American" Torvalds: Looking at the merging code, I actually think it's totally buggy. If you have something like this: - load module A: create slab cache A - load module B: create slab cache B that can merge with A - unload module A - "cat /proc/slabinfo": BOOM. Oops. exactly because the name is not handled correctly, and you'll have module B holding open a slab cache that has a name pointer that points to module A that no longer exists. This patch fixes the problem by using kstrdup() to allocate dynamic memory for ->name of "struct kmem_cache" as suggested by Christoph Lameter. Acked-by: Christoph Lameter Cc: David Rientjes Reported-by: Linus Torvalds Signed-off-by: Pekka Enberg Conflicts: mm/slub.c --- Reading git-diff-tree failed