Commit:     0b44f7a5b5078d737b3f5914978aabb761254840
Parent:     4b6f0750457db1f573eb6226960a432da3be8fe2
Author:     Christoph Lameter <[EMAIL PROTECTED]>
AuthorDate: Wed May 16 22:10:53 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Thu May 17 05:23:03 2007 -0700

    slab: warn on zero-length allocations
    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
    Signed-off-by: Christoph Lameter <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
 mm/slab.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/mm/slab.c b/mm/slab.c
index 1234443..2043102 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -789,6 +789,7 @@ static inline struct kmem_cache 
*__find_general_cachep(size_t size,
        BUG_ON(malloc_sizes[INDEX_AC].cs_cachep == NULL);
+       WARN_ON_ONCE(size == 0);
        while (size > csizep->cs_size)
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to