vmscan: avoid multiplication overflow in shrink_zone()
authorAndrew Morton <akpm@linux-foundation.org>
Thu, 30 Apr 2009 22:08:55 +0000 (15:08 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 2 May 2009 22:36:10 +0000 (15:36 -0700)
commit8713e01295140f674a41f2199b0f7ca99dfb69d5
tree0e222bd3469534f040c087c334b68e869e2dbb5f
parent0ae05fb254a5f2617fc8fcfff7be959b54a5e963
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>
mm/vmscan.c