memblock: ensure there is no overflow in memblock_overlaps_region()
There maybe an overflow in memblock_overlaps_region() if it is called with base and size such that base + size > PHYS_ADDR_MAX Make sure that memblock_overlaps_region() caps the size to prevent such overflow and remove now duplicated call to memblock_cap_size() from memblock_is_region_reserved(). Signed-off-by: NMike Rapoport <rppt@linux.ibm.com> Tested-by: NTony Lindgren <tony@atomide.com>
Showing
想要评论请 注册 或 登录