This fixes a bug with setting a breakpoint during kdb initialization (from kdb_cmds). Any call to kdb_printf() before the initialization of the kgdboc serial console driver (which happens much later during bootup than kdb_init), results in kernel panic due to the use of dbg_io_ops before it is initialized.
Showing the changes to kernel/debug (1 of 1 file). Show all
Unified · Split
| @@ -689,7 +689,7 @@ kdb_printit: · 688 unmodified lines | ||
| 689 | 689 | if (!dbg_kdb_mode && kgdb_connected) { |
| 690 | 690 | gdbstub_msg_write(kdb_buffer, retlen); |
| 691 | 691 | } else { |
| 692 | − if (!dbg_io_ops->is_console) { | |
| 692 | + if (dbg_io_ops && !dbg_io_ops->is_console) { | |
| 693 | 693 | len = strlen(kdb_buffer); |
| 694 | 694 | cp = kdb_buffer; |
| 695 | 695 | while (len--) { |