The patch titled slab: warn on zero-length allocations has been added to the -mm tree. Its filename is slab-warn-on-zero-length-allocations.patch *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: slab: warn on zero-length allocations From: Christoph Lameter <clameter@xxxxxxx> slub warns on this, and we're working on making kmalloc(0) return NULL. Let's make slab warn as well so our testers detect such callers more rapidly. Signed-off-by: Christoph Lameter <clameter@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/slab.c | 1 + 1 files changed, 1 insertion(+) diff -puN mm/slab.c~slab-warn-on-zero-length-allocations mm/slab.c --- a/mm/slab.c~slab-warn-on-zero-length-allocations +++ a/mm/slab.c @@ -789,6 +789,7 @@ static inline struct kmem_cache *__find_ */ BUG_ON(malloc_sizes[INDEX_AC].cs_cachep == NULL); #endif + WARN_ON_ONCE(size == 0); while (size > csizep->cs_size) csizep++; _ Patches currently in -mm which might be from clameter@xxxxxxx are origin.patch git-ubi.patch quicklist-support-for-x86_64.patch slab-allocators-drop-support-for-destructors.patch remove-slab_ctor_constructor.patch remove-constructor-from-buffer_head.patch remove-slab_ctor_constructor-fix.patch slub-remove-depends-on-experimental-and-arch_uses_slab_page_struct.patch slab-move-two-remaining-slab-specific-definitions-to-slab_defh.patch slub-define-functions-for-cpu-slab-handling-instead-of-using.patch slub-define-functions-for-cpu-slab-handling-instead-of-using-fix.patch slab-warn-on-zero-length-allocations.patch compat_core_sys_select-avoid-kmalloc0.patch change-zonelist-order-zonelist-order-selection-logic.patch change-zonelist-order-v6-zonelist-fix.patch change-zonelist-order-auto-configuration.patch change-zonelist-order-documentaion.patch group-short-lived-and-reclaimable-kernel-allocations-use-slab_account_reclaim-to-determine-when-__gfp_reclaimable-should-be-used.patch group-short-lived-and-reclaimable-kernel-allocations-use-slab_account_reclaim-to-determine-when-__gfp_reclaimable-should-be-used-fix.patch have-kswapd-keep-a-minimum-order-free-other-than-order-0.patch have-kswapd-keep-a-minimum-order-free-other-than-order-0-fix.patch only-check-absolute-watermarks-for-alloc_high-and-alloc_harder-allocations.patch slub-mm-only-make-slub-the-default-slab-allocator.patch slub-exploit-page-mobility-to-increase-allocation-order.patch slub-reduce-antifrag-max-order.patch slub-reduce-antifrag-max-order-use-antifrag-constant-instead-of-hardcoding-page-order.patch define-percpu-smp-cacheline-align-interface.patch call-percpu-smp-cacheline-algin-interface.patch mm-implement-swap-prefetching.patch revoke-core-code.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