The patch titled
     don't prefer unsuited consoles on registration
has been added to the -mm tree.  Its filename is
     dont-prefer-unsuited-consoles-on-registration.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: don't prefer unsuited consoles on registration
From: Jan Kiszka <[EMAIL PROTECTED]>

KGDB triggers a (probably so far theoretical) issue of the automatic init
console election: If some console happens to be registered first which does
not provide a tty binding (!console->device), it prevents that more suited
consoles which are registered later on can enter the candidate pool for
console_device().  This is observable with KGDB's console which may already
be registered (and exploited!) during early debugger connections, that is
before any regular console registration.

This patch fixes the issue by postponing the final, automated
preferred_console selection until someone with a non-NULL device handler
comes around.

Signed-off-by: Jan Kiszka <[EMAIL PROTECTED]>
Cc: Jason Wessel <[EMAIL PROTECTED]>
Cc: Ingo Molnar <[EMAIL PROTECTED]>
Cc: Gerd Hoffmann <[EMAIL PROTECTED]>
Cc: Michael Ellerman <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
---

 kernel/printk.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff -puN kernel/printk.c~dont-prefer-unsuited-consoles-on-registration 
kernel/printk.c
--- a/kernel/printk.c~dont-prefer-unsuited-consoles-on-registration
+++ a/kernel/printk.c
@@ -1119,8 +1119,11 @@ void register_console(struct console *co
                        console->index = 0;
                if (console->setup == NULL ||
                    console->setup(console, NULL) == 0) {
-                       console->flags |= CON_ENABLED | CON_CONSDEV;
-                       preferred_console = 0;
+                       console->flags |= CON_ENABLED;
+                       if (console->device) {
+                               console->flags |= CON_CONSDEV;
+                               preferred_console = 0;
+                       }
                }
        }
 
_

Patches currently in -mm which might be from [EMAIL PROTECTED] are

git-x86.patch
dont-prefer-unsuited-consoles-on-registration.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to