From: Jason Wessel Date: Thu, 5 Aug 2010 14:22:25 +0000 (-0500) Subject: debug_core,kdb: fix crash when arch does not have single step X-Git-Tag: v3.0~4121^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3fa43aba08c5b5a4b407e402606fbe463239b14a;p=platform%2Fkernel%2Flinux-amlogic.git debug_core,kdb: fix crash when arch does not have single step When an arch such as mips and microblaze does not implement either HW or software single stepping the debug core should re-enter kdb. The kdb code will properly ignore the single step operation. Attempting to single step the kernel without software or hardware support causes unpredictable kernel crashes. Signed-off-by: Jason Wessel --- diff --git a/kernel/debug/debug_core.c b/kernel/debug/debug_core.c index 8bc5eef..9ed9307 100644 --- a/kernel/debug/debug_core.c +++ b/kernel/debug/debug_core.c @@ -605,6 +605,8 @@ cpu_master_loop: if (dbg_kdb_mode) { kgdb_connected = 1; error = kdb_stub(ks); + if (error == -1) + continue; kgdb_connected = 0; } else { error = gdb_serial_stub(ks);