[PATCH] mm: remove bad_range
[powerpc.git] / mm / bootmem.c
index e8c5671..16b9465 100644 (file)
@@ -204,6 +204,8 @@ restart_scan:
                unsigned long j;
                i = find_next_zero_bit(bdata->node_bootmem_map, eidx, i);
                i = ALIGN(i, incr);
+               if (i >= eidx)
+                       break;
                if (test_bit(i, bdata->node_bootmem_map))
                        continue;
                for (j = i + 1; j < i + areasize; ++j) {