Index: linux-2.6.21-rc1/mm/slub.c =================================================================== --- linux-2.6.21-rc1.orig/mm/slub.c 2007-02-24 10:44:04.000000000 -0800 +++ linux-2.6.21-rc1/mm/slub.c 2007-02-24 10:51:52.000000000 -0800 @@ -1149,7 +1149,10 @@ static struct kmem_cache *get_slab(size_ { int index = kmalloc_index(size) - KMALLOC_SHIFT_LOW; - BUG_ON(size <= 0 || index < 0); + /* Old Slab allows allocations with zero size. So warn on those */ + WARN_ON(size == 0); + /* Allocation too large ? */ + BUG_ON(index < 0); #ifdef CONFIG_ZONE_DMA if ((flags & SLUB_DMA)) {