The patch titled mm: kmem_cache_create(): make it easier to catch NULL cache names has been added to the -mm tree. Its filename is mm-kmem_cache_create-make-it-easier-to-catch-null-cache-names.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: mm: kmem_cache_create(): make it easier to catch NULL cache names From: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx> Right now, if you inadvertently pass NULL to kmem_cache_create() at boot time, it crashes much later after boot somewhere deep inside sysfs which makes it very non obvious to figure out what's going on. Signed-off-by: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx> Cc: Pekka Enberg <penberg@xxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/slub.c | 3 +++ 1 file changed, 3 insertions(+) diff -puN mm/slub.c~mm-kmem_cache_create-make-it-easier-to-catch-null-cache-names mm/slub.c --- a/mm/slub.c~mm-kmem_cache_create-make-it-easier-to-catch-null-cache-names +++ a/mm/slub.c @@ -3327,6 +3327,9 @@ struct kmem_cache *kmem_cache_create(con { struct kmem_cache *s; + if (WARN_ON(!name)) + return NULL; + down_write(&slub_lock); s = find_mergeable(size, align, flags, name, ctor); if (s) { _ Patches currently in -mm which might be from benh@xxxxxxxxxxxxxxxxxxx are origin.patch linux-next.patch powerpc-sky-cpu-redundant-or-incorrect-tests-on-unsigned.patch powerpc-cell-replace-strncpy-by-strlcpy.patch mm-kmem_cache_create-make-it-easier-to-catch-null-cache-names.patch platinumfb-misplaced-parenthesis.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html