From: Atsuo Igarashi Date: Fri, 26 Sep 2008 15:36:41 +0000 (-0500) Subject: kgdb: could not write to the last of valid memory with kgdb X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=18d6522b86d21a04c8ac1ea79747e2e434a956d9;p=linux-beck.git kgdb: could not write to the last of valid memory with kgdb On the ARM architecture, kgdb will crash the kernel if the last byte of valid memory is written due to a flush_icache_range flushing beyond the memory boundary. Signed-off-by: Atsuo Igarashi Signed-off-by: Jason Wessel --- diff --git a/kernel/kgdb.c b/kernel/kgdb.c index eaa21fc9ad1d..949806ab67de 100644 --- a/kernel/kgdb.c +++ b/kernel/kgdb.c @@ -488,7 +488,7 @@ static int write_mem_msg(int binary) if (err) return err; if (CACHE_FLUSH_IS_SAFE) - flush_icache_range(addr, addr + length + 1); + flush_icache_range(addr, addr + length); return 0; }