]> git.baikalelectronics.ru Git - kernel.git/commit
mm: do not iterate over NR_CPUS in __zone_pcp_update()
authorThomas Gleixner <tglx@linutronix.de>
Wed, 10 Mar 2010 23:20:40 +0000 (15:20 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 12 Mar 2010 23:52:28 +0000 (15:52 -0800)
commit3d489e86c48d2d578dc2f493bfea94ff79238625
tree11936ee1bdab8b01503c3e71b2868a8139c9d00a
parenta994eef85d51828cebad24fee00fa5e087352836
mm: do not iterate over NR_CPUS in __zone_pcp_update()

__zone_pcp_update() iterates over NR_CPUS instead of limiting the access
to the possible cpus.  This might result in access to uninitialized areas
as the per cpu allocator only populates the per cpu memory for possible
cpus.

This problem was created as a result of the dynamic allocation of pagesets
from percpu memory that went in during the merge window - commit
d13090264730f8cd93376dfd6b8661eeda1d4285 ("this_cpu: Page allocator
conversion").

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Tejun Heo <tj@kernel.org>
Acked-by: Christoph Lameter <cl@linux-foundation.org>
Acked-by: Mel Gorman <mel@csn.ul.ie>
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/page_alloc.c