diff options
| author | Andrew Morton <[email protected]> | 2009-04-30 15:08:55 -0700 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2009-05-02 15:36:10 -0700 |
| commit | 8713e01295140f674a41f2199b0f7ca99dfb69d5 (patch) | |
| tree | 0e222bd3469534f040c087c334b68e869e2dbb5f | |
| parent | 0ae05fb254a5f2617fc8fcfff7be959b54a5e963 (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 <[email protected]>
Cc: Wu Fengguang <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Rik van Riel <[email protected]>
Cc: Lee Schermerhorn <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
| -rw-r--r-- | mm/vmscan.c | 2 |
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, for_each_evictable_lru(l) { int file = is_file_lru(l); - int scan; + unsigned long scan; scan = zone_nr_pages(zone, sc, l); if (priority) { |