History

kdb: Fix smatch warning on dbg_io_ops->is_console

The Smatch tool warned that the change from commit b8adde8dd (kdb: Avoid using dbg_io_ops until it is initialized) should add another null check later in the kdb_printf(). It is worth noting that the second use of dbg_io_ops->is_console is protected by the KDB_PAGER state variable which would only get set when kdb is fully active and initialized. If we ever encounter changes or defects in the KDB_PAGER state we do not want to crash the kernel in a kdb_printf/printk.

Jason Wessel committed 14 years ago

Commit 78724b81 parent 1ba0c171 file · +1 −1Browse files

Showing the changes to kernel/debug (1 of 1 file). Show all

Unified · Split

kernel/debug/kdb/kdb_io.c+1−1
@@ -743,7 +743,7 @@ kdb_printit: · 742 unmodified lines
743743 kdb_input_flush();
744744 c = console_drivers;
745745
746− if (!dbg_io_ops->is_console) {
746+ if (dbg_io_ops && !dbg_io_ops->is_console) {
747747 len = strlen(moreprompt);
748748 cp = moreprompt;
749749 while (len--) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t