Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Revert "hvc_console: display printk messages on console."

This reverts commit 361162459f62dc0826b82c9690a741a940f457f0.

It causes an infinite loop when booting Linux under Xen, as so:

[ 2.382984] console [hvc0] enabled
[ 2.382984] console [hvc0] enabled
[ 2.382984] console [hvc0] enabled
...

as reported by Konrad Rzeszutek Wilk. And Rusty reports the same for
lguest. He goes on to say:

"This is not a concurrency problem: the issue seems to be that
calling register_console() twice on the same struct console is a bad
idea."

and Greg says he'll fix it up properly at some point later. Revert for now.

Reported-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reported-by: Rusty Russell <rusty@ozlabs.org>
Requested-by: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Miche Baker-Harvey <miche@google.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

+1 -6
+1 -6
drivers/tty/hvc/hvc_console.c
··· 852 852 * find index to use: 853 853 * see if this vterm id matches one registered for console. 854 854 */ 855 - for (i = 0; i < MAX_NR_HVC_CONSOLES; i++) 855 + for (i=0; i < MAX_NR_HVC_CONSOLES; i++) 856 856 if (vtermnos[i] == hp->vtermno && 857 857 cons_ops[i] == hp->ops) 858 858 break; ··· 862 862 i = ++last_hvc; 863 863 864 864 hp->index = i; 865 - hvc_console.index = i; 866 - vtermnos[i] = vtermno; 867 - cons_ops[i] = ops; 868 865 869 866 list_add_tail(&(hp->next), &hvc_structs); 870 867 spin_unlock(&hvc_structs_lock); 871 - register_console(&hvc_console); 872 868 873 869 return hp; 874 870 } ··· 875 879 unsigned long flags; 876 880 struct tty_struct *tty; 877 881 878 - unregister_console(&hvc_console); 879 882 spin_lock_irqsave(&hp->lock, flags); 880 883 tty = tty_kref_get(hp->tty); 881 884