Skip to content

Commit

Permalink
kgdb: could not write to the last of valid memory with kgdb
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Atsuo Igarashi authored and Jason Wessel committed Sep 26, 2008
1 parent 6ef190c commit 18d6522
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/kgdb.c
Original file line number Diff line number Diff line change
@@ -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;
}

0 comments on commit 18d6522

Please sign in to comment.