kdb: Switch to use safer dbg_io_ops over console APIs
[sfrench/cifs-2.6.git] / kernel / debug / kdb / kdb_io.c
index 0e4f2eda96d8982929d925a910d5f3acdbec1d5b..683a799618ade75589ebe151f218e4ab561d298f 100644 (file)
@@ -549,7 +549,7 @@ static void kdb_msg_write(const char *msg, int msg_len)
        if (msg_len == 0)
                return;
 
-       if (dbg_io_ops && !dbg_io_ops->is_console) {
+       if (dbg_io_ops) {
                const char *cp = msg;
                int len = msg_len;
 
@@ -562,6 +562,8 @@ static void kdb_msg_write(const char *msg, int msg_len)
        for_each_console(c) {
                if (!(c->flags & CON_ENABLED))
                        continue;
+               if (c == dbg_io_ops->cons)
+                       continue;
                /*
                 * Set oops_in_progress to encourage the console drivers to
                 * disregard their internal spin locks: in the current calling