diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/s390/kernel/early.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/s390/kernel/early.c b/arch/s390/kernel/early.c index e6289ee74ecd..8bf4ae1150be 100644 --- a/arch/s390/kernel/early.c +++ b/arch/s390/kernel/early.c @@ -200,11 +200,13 @@ static noinline __init void find_memory_chunks(unsigned long memsize) cc = __tprot(addr); while (cc == old_cc) { addr += CHUNK_INCR; - cc = __tprot(addr); + if (addr >= memsize) + break; #ifndef CONFIG_64BIT if (addr == ADDR2G) break; #endif + cc = __tprot(addr); } if (old_addr != addr && |