aboutsummaryrefslogtreecommitdiffstats
path: root/mm/vmscan.c
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2009-04-30 18:08:55 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-05-02 18:36:10 -0400
commit8713e01295140f674a41f2199b0f7ca99dfb69d5 (patch)
tree0e222bd3469534f040c087c334b68e869e2dbb5f /mm/vmscan.c
parent0ae05fb254a5f2617fc8fcfff7be959b54a5e963 (diff)
vmscan: avoid multiplication overflow in shrink_zone()
Local variable `scan' can overflow on zones which are larger than (2G * 4k) / 100 = 80GB. Making it 64-bit on 64-bit will fix that up. Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Cc: Wu Fengguang <fengguang.wu@intel.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Rik van Riel <riel@redhat.com> Cc: Lee Schermerhorn <lee.schermerhorn@hp.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/vmscan.c')
-rw-r--r--mm/vmscan.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c
index eac9577941f9..5fa3eda1f03f 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1471,7 +1471,7 @@ static void shrink_zone(int priority, struct zone *zone,
1471 1471
1472 for_each_evictable_lru(l) { 1472 for_each_evictable_lru(l) {
1473 int file = is_file_lru(l); 1473 int file = is_file_lru(l);
1474 int scan; 1474 unsigned long scan;
1475 1475
1476 scan = zone_nr_pages(zone, sc, l); 1476 scan = zone_nr_pages(zone, sc, l);
1477 if (priority) { 1477 if (priority) {