--- linux-2.4.20-uml/mm/slab.c 2003-02-27 20:56:12.000000000 +0100 +++ linux-2.4.20-uml-henrik/mm/slab.c 2003-05-26 20:57:44.000000000 +0200 @@ -1338,6 +1338,12 @@ unsigned long save_flags; void* objp; +#if DEBUG + /* trap atomic bugs early on when debugging */ + if (in_interrupt() && (flags & SLAB_LEVEL_MASK) != SLAB_ATOMIC) + BUG(); +#endif + kmem_cache_alloc_head(cachep, flags); try_again: local_irq_save(save_flags);