From: Andrew Morton If we're using 32-bit sizes, bring back the code which avoids overflowing the values in the resource tree. Cc: Greg KH Cc: Maneesh Soni Cc: Vivek Goyal Signed-off-by: Andrew Morton --- arch/i386/kernel/setup.c | 4 ++++ 1 files changed, 4 insertions(+) diff -puN arch/i386/kernel/setup.c~kconfigurable-resources-core-changes-i386-fix arch/i386/kernel/setup.c --- devel/arch/i386/kernel/setup.c~kconfigurable-resources-core-changes-i386-fix 2006-05-13 05:19:01.000000000 -0700 +++ devel-akpm/arch/i386/kernel/setup.c 2006-05-13 05:21:02.000000000 -0700 @@ -1319,6 +1319,10 @@ legacy_init_iomem_resources(struct resou probe_roms(); for (i = 0; i < e820.nr_map; i++) { struct resource *res; +#ifdef CONFIG_RESOURCES_32BIT + if (e820.map[i].addr + e820.map[i].size > 0x100000000ULL) + continue; +#endif res = kzalloc(sizeof(struct resource), GFP_ATOMIC); switch (e820.map[i].type) { case E820_RAM: res->name = "System RAM"; break; _