[PATCH] of: Use proper types for checking memory overflow

Geert Uytterhoeven geert at linux-m68k.org
Tue Jul 8 00:15:27 PDT 2014


On Tue, Jul 8, 2014 at 2:45 AM, Laura Abbott <lauraa at codeaurora.org> wrote:
> Commit a67a6ed15513541579d38bcbd127e7be170710e5
> (of: Check for phys_addr_t overflows in early_init_dt_add_memory_arch)
> corrected early_init_dt_add_memory_arch to account for overflows
> but did so in an unclean way using ULONG_MAX. There is no
> guarantee that sizeof(unsigned long) == sizeof(phys_addr_t).
> Check against phys_addr_t instead.

Thanks!

> Signed-off-by: Laura Abbott <lauraa at codeaurora.org>

Tested-by: Geert Uytterhoeven <geert at linux-m68k.org>

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds



More information about the linux-arm-kernel mailing list