From: Laura Abbott Date: Fri, 20 Jun 2014 03:13:38 +0000 (-0700) Subject: of: Check for phys_addr_t overflows in early_init_dt_add_memory_arch X-Git-Tag: omap-for-v3.16/fixes-rc4~11^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a67a6ed15513541579d38bcbd127e7be170710e5;p=pandora-kernel.git of: Check for phys_addr_t overflows in early_init_dt_add_memory_arch The common early_init_dt_add_memory_arch takes the base and size of a memory region as u64 types. The function never checks if the base and size can actually fit in a phys_addr_t which may be smaller than 64-bits. This may result in incorrect memory being passed to memblock_add if the memory falls outside the range of phys_addr_t. Add range checks for the base and size if phys_addr_t is smaller than u64. Reported-by: Geert Uytterhoeven Tested-by: Geert Uytterhoeven Signed-off-by: Laura Abbott Acked-by: Nicolas Pitre Signed-off-by: Grant Likely --- Reading git-diff-tree failed