From: Christoph Lameter The GFP_DMA check in the slab is not necessary if there is no ZONE_DMA available. The SCSI layer still sets GFP_DMA just in case which may cause the BUG_ON to fire although there cannot be a an issue since systems with CONFIG_ZONE_DMA off have no DMA restrictions. This bug was triggered by Paul Jackson on an SGI Altix system. Altix never had any memory below 4G (meaning of ZONE_DMA on ia64) and the driver has been working for ages. Signed-off-by: Christoph Lameter Signed-off-by: Andrew Morton --- mm/slab.c | 2 ++ 1 files changed, 2 insertions(+) diff -puN mm/slab.c~optional-zone_dma-in-the-vm-no-gfp_dma-check-in-the-slab-if-no-config_zone_dma-is-set mm/slab.c --- a/mm/slab.c~optional-zone_dma-in-the-vm-no-gfp_dma-check-in-the-slab-if-no-config_zone_dma-is-set +++ a/mm/slab.c @@ -2621,10 +2621,12 @@ static void cache_init_objs(struct kmem_ static void kmem_flagcheck(struct kmem_cache *cachep, gfp_t flags) { +#ifdef CONFIG_ZONE_DMA if (flags & SLAB_DMA) BUG_ON(!(cachep->gfpflags & GFP_DMA)); else BUG_ON(cachep->gfpflags & GFP_DMA); +#endif } static void *slab_get_obj(struct kmem_cache *cachep, struct slab *slabp, _