Skip to content

Commit

Permalink
drivers/tty/hvc: don't free hvc_console_setup after init
Browse files Browse the repository at this point in the history
When 'console=hvc0' is specified to the kernel parameter in x86 KVM guest,
hvc console is setup within a kthread. However, that will cause SEGV
and the boot will fail when the driver is builtin to the kernel,
because currently hvc_console_setup() is annotated with '__init'. This
patch removes '__init' to boot the guest successfully with 'console=hvc0'.

Signed-off-by: Tomoki Sekiyama <tomoki.sekiyama@hds.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Tomoki Sekiyama authored and Greg Kroah-Hartman committed May 3, 2014
1 parent 4291086 commit 501fed4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/tty/hvc/hvc_console.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ static struct tty_driver *hvc_console_device(struct console *c, int *index)
return hvc_driver;
}

static int __init hvc_console_setup(struct console *co, char *options)
static int hvc_console_setup(struct console *co, char *options)
{
if (co->index < 0 || co->index >= MAX_NR_HVC_CONSOLES)
return -ENODEV;
Expand Down

0 comments on commit 501fed4

Please sign in to comment.