]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] __vmalloc with GFP_ATOMIC causes 'sleeping from invalid context'
authorGiridhar Pemmasani <pgiri@yahoo.com>
Sat, 28 Oct 2006 17:38:34 +0000 (10:38 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Sat, 28 Oct 2006 18:30:52 +0000 (11:30 -0700)
commit2e1fbe7c5222e8690dc5f54f6423ef1f4e25fb47
treebb3959b403c4bfec138b61e7943e17a76dc6cad6
parent4d3a45420bfd691227cdac7536d1851e25b291f3
[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>
include/linux/vmalloc.h
mm/vmalloc.c