mm/page_alloc: protect pcp->batch accesses with ACCESS_ONCE
authorCody P Schafer <cody@linux.vnet.ibm.com>
Wed, 3 Jul 2013 22:01:32 +0000 (15:01 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 3 Jul 2013 23:07:27 +0000 (16:07 -0700)
commit998d39cb236fe464af86a3492a24d2f67ee1efc2
treec093fb89e8d4a4b62e656f5becf92876ce13f958
parent8d7a8fa97abeb4fd6b3975d32c9f859875157770
mm/page_alloc: protect pcp->batch accesses with ACCESS_ONCE

pcp->batch could change at any point, avoid relying on it being a stable
value.

Signed-off-by: Cody P Schafer <cody@linux.vnet.ibm.com>
Cc: Gilad Ben-Yossef <gilad@benyossef.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@gmail.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Pekka Enberg <penberg@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/page_alloc.c