Commit 5da4fe4a authored by Elliott Hughes's avatar Elliott Hughes
Browse files

Fix overflow in get_phys_pages and get_avphys_pages.



On LP32 mem_unit will be 4096 to allow more than 4GiB in the "ulong"
fields, but we need to promote to a 64-bit type before we multiply.

Bug: N/A
Test: tested manually with an x86 static binary on my 64GiB desktop.
Signed-off-by: default avatarYiPing Xu <xuyiping@hisilicon.com>
Change-Id: Id663932503b75793bb7c26a008129f3e2e4cccbf
parent 96c577c4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment