Эх сурвалжийг харах

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 <atsuo_igarashi@tripeaks.co.jp>
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Atsuo Igarashi 16 жил өмнө
parent
commit
18d6522b86
1 өөрчлөгдсөн 1 нэмэгдсэн , 1 устгасан
  1. 1 1
      kernel/kgdb.c

+ 1 - 1
kernel/kgdb.c

@@ -488,7 +488,7 @@ static int write_mem_msg(int binary)
 		if (err)
 		if (err)
 			return err;
 			return err;
 		if (CACHE_FLUSH_IS_SAFE)
 		if (CACHE_FLUSH_IS_SAFE)
-			flush_icache_range(addr, addr + length + 1);
+			flush_icache_range(addr, addr + length);
 		return 0;
 		return 0;
 	}
 	}