--- mm/slab.c | 2 ++ mm/slob.c | 3 +++ mm/slub.c | 2 ++ 3 files changed, 7 insertions(+) Index: linux-2.6/mm/slab.c =================================================================== --- linux-2.6.orig/mm/slab.c 2008-02-27 11:16:13.000000000 -0800 +++ linux-2.6/mm/slab.c 2008-02-27 11:16:16.000000000 -0800 @@ -3764,6 +3764,8 @@ void kmem_cache_free(struct kmem_cache * { unsigned long flags; + if (unlikely(!objp)) + return; local_irq_save(flags); debug_check_no_locks_freed(objp, obj_size(cachep)); __cache_free(cachep, objp); Index: linux-2.6/mm/slob.c =================================================================== --- linux-2.6.orig/mm/slob.c 2008-02-27 11:16:13.000000000 -0800 +++ linux-2.6/mm/slob.c 2008-02-27 11:16:16.000000000 -0800 @@ -581,6 +581,9 @@ EXPORT_SYMBOL(kmem_cache_alloc_node); static void __kmem_cache_free(void *b, int size) { + if (unlikely(!b)) + return; + if (size < PAGE_SIZE) slob_free(b, size); else Index: linux-2.6/mm/slub.c =================================================================== --- linux-2.6.orig/mm/slub.c 2008-02-27 11:16:13.000000000 -0800 +++ linux-2.6/mm/slub.c 2008-02-27 11:16:16.000000000 -0800 @@ -1740,6 +1740,8 @@ void kmem_cache_free(struct kmem_cache * { struct page *page; + if (unlikely(!x)) + return; page = virt_to_head_page(x); slab_free(s, page, x, __builtin_return_address(0));