[PATCH 1/5] kgdb: could not write to the last of valid memory with kgdb

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Jason Wessel
Date: Friday, September 26, 2008 - 11:05 am

From: Atsuo Igarashi <atsuo_igarashi@tripeaks.co.jp>

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>
---
 kernel/kgdb.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/kgdb.c b/kernel/kgdb.c
index eaa21fc..949806a 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;
 	}
 
-- 
1.6.0.90.g436ed.dirty

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[git pull] kgdb 2.6.27-rc7 fixes , Jason Wessel, (Fri Sep 26, 11:05 am)
[PATCH 1/5] kgdb: could not write to the last of valid mem ..., Jason Wessel, (Fri Sep 26, 11:05 am)