From: David Rientjes Date: Wed, 25 May 2011 00:12:35 +0000 (-0700) Subject: mm: fail GFP_DMA allocations when ZONE_DMA is not configured X-Git-Tag: v3.0-rc1~234 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a197b59ae6e8bee56fcef37ea2482dc08414e2ac;p=pandora-kernel.git mm: fail GFP_DMA allocations when ZONE_DMA is not configured The page allocator will improperly return a page from ZONE_NORMAL even when __GFP_DMA is passed if CONFIG_ZONE_DMA is disabled. The caller expects DMA memory, perhaps for ISA devices with 16-bit address registers, and may get higher memory resulting in undefined behavior. This patch causes the page allocator to return NULL in such circumstances with a warning emitted to the kernel log on the first occurrence. Signed-off-by: David Rientjes Cc: Mel Gorman Cc: KOSAKI Motohiro Cc: KAMEZAWA Hiroyuki Cc: Rik van Riel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed