On 07/16/2015 05:20 AM, Tejun Heo wrote:
On Wed, Jul 01, 2015 at 11:16:54AM +0800, Tang Chen wrote:
...
-               /* and there's no empty block */
-               if (bi->start >= bi->end)
+               /* and there's no empty or non-exist block */
+               if (bi->start >= bi->end ||
+                   memblock_overlaps_region(&memblock.memory,
+                       bi->start, bi->end - bi->start) == -1)
Ugh.... can you please change memblock_overlaps_region() to return
bool instead?

Well, I think memblock_overlaps_region() is designed to return
the index of the region overlapping with the given region.

Of course for now, it is only called by memblock_is_region_reserved().

Will post a patch to do this.

Thanks.


Thanks.


--
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