]> git.baikalelectronics.ru Git - kernel.git/commit
page allocator: sanity check order in the page allocator slow path
authorMel Gorman <mel@csn.ul.ie>
Tue, 16 Jun 2009 22:32:18 +0000 (15:32 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 17 Jun 2009 02:47:36 +0000 (19:47 -0700)
commit17b06361e438cf5d9c9c312b2b36de778ac16274
treed0f4a4a835754286ec9e2b940e950b2b68a4f61b
parente98d44652c52b5bd1c2a620688ecaf6a496d6646
page allocator: sanity check order in the page allocator slow path

Callers may speculatively call different allocators in order of preference
trying to allocate a buffer of a given size.  The order needed to allocate
this may be larger than what the page allocator can normally handle.
While the allocator mostly does the right thing, it should not direct
reclaim or wakeup kswapd with a bogus order.  This patch sanity checks the
order in the slow path and returns NULL if it is too large.

Signed-off-by: Mel Gorman <mel@csn.ul.ie>
Signed-off-by: Dave Hansen <dave@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/page_alloc.c