page allocator: do not sanity check order in the fast path
[pandora-kernel.git] / mm / page_alloc.c
index d58df90..bfbd95c 100644 (file)
@@ -1401,6 +1401,9 @@ get_page_from_freelist(gfp_t gfp_mask, nodemask_t *nodemask, unsigned int order,
 
        classzone_idx = zone_idx(preferred_zone);
 
+       if (WARN_ON_ONCE(order >= MAX_ORDER))
+               return NULL;
+
 zonelist_scan:
        /*
         * Scan zonelist, looking for a zone with enough free.