aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorArd Biesheuvel <[email protected]>2014-10-29 17:09:32 +0100
committerGrant Likely <[email protected]>2014-11-04 16:43:10 +0000
commit8cccffc52694938fc88f3d90bc7fed8460e27191 (patch)
tree76ea435917e5cfd97859a813103a3aaa52ae5124 /scripts
parent50ba08f301a1b0310775deeed00c9b24ba75fe8a (diff)
of: check for size < 0 after rounding in early_init_dt_add_memory_arch
Memory regions passed to early_init_dt_add_memory_arch() are rounded to PAGE_SIZE by subtracting the size of the leading fractional page from the 'size' argument. However, size being a u64 type, if its value is sufficiently small, the subtraction wraps around and produces a bogus value, potentially leading to crashes. Fix this by ignoring the memory range in such cases. Signed-off-by: Ard Biesheuvel <[email protected]> Signed-off-by: Grant Likely <[email protected]>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions