On Thu, 8 Mar 2007, Yasunori Goto wrote:


Hello.

The BUG_ON() check at move_freepages() is wrong.
Its end_page is start_page + MAX_ORDER_NR_PAGES. So, it can be
next zone. BUG_ON() should check "end_page - 1".


You're right on all counts.

This is fix of 2.6.21-rc3-mm2 for it.

Signed-off-by: Yasunori Goto <[EMAIL PROTECTED]>


Acked-by: Mel Gorman <[EMAIL PROTECTED]>

---
mm/page_alloc.c |    2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Index: current_test/mm/page_alloc.c
===================================================================
--- current_test.orig/mm/page_alloc.c   2007-03-08 15:44:10.000000000 +0900
+++ current_test/mm/page_alloc.c        2007-03-08 16:17:29.000000000 +0900
@@ -707,7 +707,7 @@ int move_freepages(struct zone *zone,
        unsigned long order;
        int blocks_moved = 0;

-       BUG_ON(page_zone(start_page) != page_zone(end_page));
+       BUG_ON(page_zone(start_page) != page_zone(end_page - 1));

        for (page = start_page; page < end_page;) {
                if (!PageBuddy(page)) {

--
Yasunori Goto



--
Mel Gorman
Part-time Phd Student                          Linux Technology Center
University of Limerick                         IBM Dublin Software Lab
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to