aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorGiridhar Pemmasani <pgiri@yahoo.com>2006-10-28 13:38:34 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-28 14:30:52 -0400
commit52fd24ca1db3a741f144bbc229beefe044202cac (patch)
treebb3959b403c4bfec138b61e7943e17a76dc6cad6 /include
parent6a2aae06cc1e87e9712a26a639f6a2f3442e2027 (diff)
[PATCH] __vmalloc with GFP_ATOMIC causes 'sleeping from invalid context'
If __vmalloc is called to allocate memory with GFP_ATOMIC in atomic context, the chain of calls results in __get_vm_area_node allocating memory for vm_struct with GFP_KERNEL, causing the 'sleeping from invalid context' warning. This patch fixes it by passing the gfp flags along so __get_vm_area_node allocates memory for vm_struct with the same flags. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/vmalloc.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h
index ce5f1482e6be..dc9a29d84abc 100644
--- a/include/linux/vmalloc.h
+++ b/include/linux/vmalloc.h
@@ -60,7 +60,8 @@ extern struct vm_struct *get_vm_area(unsigned long size, unsigned long flags);
60extern struct vm_struct *__get_vm_area(unsigned long size, unsigned long flags, 60extern struct vm_struct *__get_vm_area(unsigned long size, unsigned long flags,
61 unsigned long start, unsigned long end); 61 unsigned long start, unsigned long end);
62extern struct vm_struct *get_vm_area_node(unsigned long size, 62extern struct vm_struct *get_vm_area_node(unsigned long size,
63 unsigned long flags, int node); 63 unsigned long flags, int node,
64 gfp_t gfp_mask);
64extern struct vm_struct *remove_vm_area(void *addr); 65extern struct vm_struct *remove_vm_area(void *addr);
65extern int map_vm_area(struct vm_struct *area, pgprot_t prot, 66extern int map_vm_area(struct vm_struct *area, pgprot_t prot,
66 struct page ***pages); 67 struct page ***pages);