From: Andrew Morton <[email-masked]>

It goes BUG() rather quickly.

Cc: Benjamin LaHaise <[email-masked]>
Signed-off-by: Andrew Morton <[email-masked]>
---

 mm/slab.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -puN mm/slab.c~make-kmalloc-fail-for-swapped-size--gfp-flags-fix mm/slab.c
--- devel/mm/slab.c~make-kmalloc-fail-for-swapped-size--gfp-flags-fix	2005-07-26 02:45:49.000000000 -0700
+++ devel-akpm/mm/slab.c	2005-07-26 02:45:49.000000000 -0700
@@ -1802,7 +1802,7 @@ static int cache_grow(kmem_cache_t *cach
 	/* Be lazy and only check for valid flags here,
  	 * keeping it out of the critical path in kmem_cache_alloc().
 	 */
-	if (flags & ~(SLAB_DMA|SLAB_LEVEL_MASK|SLAB_NO_GROW))
+	if (flags & ~(SLAB_DMA|SLAB_LEVEL_MASK|SLAB_NO_GROW|__GFP_VALID))
 		BUG();
 	if (flags & SLAB_NO_GROW)
 		return 0;
_