Re: [PATCH]vmscan: handle underflow for get_scan_ratio

Wu Fengguang
2010-04-06T05:03:38Z

Shaohua,

> + scan = zone_nr_lru_pages(zone, sc, l);
> + if (priority) {
> + scan >>= priority;
> + scan = (scan * fraction[file] / denominator[file]);

Ah, the (scan * fraction[file]) may overflow in 32bit kernel!

Thanks,
Fengguang