Skip to content

Commit

Permalink
serial: bfin_5xx: kgdboc should accept gdb break only when it is active
Browse files Browse the repository at this point in the history
If we always check for gdb breaks even when it isn't active, we get false
positives on normal code and the system panics.

URL: http://blackfin.uclinux.org/gf/tracker/5277

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Sonic Zhang authored and Greg Kroah-Hartman committed Mar 2, 2010
1 parent 7ed43f6 commit cdc592d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/serial/bfin_5xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,8 @@ static void bfin_serial_rx_chars(struct bfin_serial_port *uart)

#if defined(CONFIG_KGDB_SERIAL_CONSOLE) || \
defined(CONFIG_KGDB_SERIAL_CONSOLE_MODULE)
if (kgdb_connected && kgdboc_port_line == uart->port.line)
if (kgdb_connected && kgdboc_port_line == uart->port.line
&& kgdboc_break_enabled)
if (ch == 0x3) {/* Ctrl + C */
kgdb_breakpoint();
return;
Expand Down

0 comments on commit cdc592d

Please sign in to comment.