]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
mm: fix incorrect variable type in do_try_to_free_pages()
authorkosaki.motohiro@jp.fujitsu.com <kosaki.motohiro@jp.fujitsu.com>
Thu, 12 Jun 2008 22:21:27 +0000 (15:21 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 13 Jun 2008 01:05:39 +0000 (18:05 -0700)
"Smarter retry of costly-order allocations" patch series change behaver of
do_try_to_free_pages().  But unfortunately ret variable type was
unchanged.

Thus an overflow is possible.

Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Acked-by: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/vmscan.c

index 9a29901ad3b3474858d94f1e281306645f5fc297..967d30ccd92b8f3a453951104a761986b6d88a6a 100644 (file)
@@ -1307,7 +1307,7 @@ static unsigned long do_try_to_free_pages(struct zonelist *zonelist,
                                        struct scan_control *sc)
 {
        int priority;
-       int ret = 0;
+       unsigned long ret = 0;
        unsigned long total_scanned = 0;
        unsigned long nr_reclaimed = 0;
        struct reclaim_state *reclaim_state = current->reclaim_state;