aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2007-07-19 04:49:10 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-19 13:04:50 -0400
commit7ac674f52778b95450509357435320be1d795248 (patch)
tree93657e44d8d7ba7f8857ba038074e2ec4a9c2d38 /mm
parentea02e3dde3509ffa7fda7f8de9c8a366e03f7bbd (diff)
vmalloc_32 should use GFP_KERNEL
I've noticed lots of failures of vmalloc_32 on machines where it shouldn't have failed unless it was doing an atomic operation. Looking closely, I noticed that: #if defined(CONFIG_64BIT) && defined(CONFIG_ZONE_DMA32) #define GFP_VMALLOC32 GFP_DMA32 #elif defined(CONFIG_64BIT) && defined(CONFIG_ZONE_DMA) #define GFP_VMALLOC32 GFP_DMA #else #define GFP_VMALLOC32 GFP_KERNEL #endif Which seems to be incorrect, it should always -or- in the DMA flags on top of GFP_KERNEL, thus this patch. This fixes frequent errors launchin X with the nouveau DRM for example. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Andi Kleen <ak@suse.de> Cc: Dave Airlie <airlied@linux.ie> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/vmalloc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index 3130c343088f..213d5e5079ff 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -583,9 +583,9 @@ void *vmalloc_exec(unsigned long size)
583} 583}
584 584
585#if defined(CONFIG_64BIT) && defined(CONFIG_ZONE_DMA32) 585#if defined(CONFIG_64BIT) && defined(CONFIG_ZONE_DMA32)
586#define GFP_VMALLOC32 GFP_DMA32 586#define GFP_VMALLOC32 GFP_DMA32 | GFP_KERNEL
587#elif defined(CONFIG_64BIT) && defined(CONFIG_ZONE_DMA) 587#elif defined(CONFIG_64BIT) && defined(CONFIG_ZONE_DMA)
588#define GFP_VMALLOC32 GFP_DMA 588#define GFP_VMALLOC32 GFP_DMA | GFP_KERNEL
589#else 589#else
590#define GFP_VMALLOC32 GFP_KERNEL 590#define GFP_VMALLOC32 GFP_KERNEL
591#endif 591#endif