diff options
-rw-r--r-- | arch/um/drivers/line.c | 8 | ||||
-rw-r--r-- | arch/um/drivers/mconsole_kern.c | 8 |
2 files changed, 12 insertions, 4 deletions
diff --git a/arch/um/drivers/line.c b/arch/um/drivers/line.c index fac058b49282..2c898c4d6b6a 100644 --- a/arch/um/drivers/line.c +++ b/arch/um/drivers/line.c | |||
@@ -774,9 +774,11 @@ static irqreturn_t winch_interrupt(int irq, void *data) | |||
774 | tty = winch->tty; | 774 | tty = winch->tty; |
775 | if (tty != NULL) { | 775 | if (tty != NULL) { |
776 | line = tty->driver_data; | 776 | line = tty->driver_data; |
777 | chan_window_size(&line->chan_list, &tty->winsize.ws_row, | 777 | if (line != NULL) { |
778 | &tty->winsize.ws_col); | 778 | chan_window_size(&line->chan_list, &tty->winsize.ws_row, |
779 | kill_pgrp(tty->pgrp, SIGWINCH, 1); | 779 | &tty->winsize.ws_col); |
780 | kill_pgrp(tty->pgrp, SIGWINCH, 1); | ||
781 | } | ||
780 | } | 782 | } |
781 | out: | 783 | out: |
782 | if (winch->fd != -1) | 784 | if (winch->fd != -1) |
diff --git a/arch/um/drivers/mconsole_kern.c b/arch/um/drivers/mconsole_kern.c index fabd75f5bb5c..c953e1477be4 100644 --- a/arch/um/drivers/mconsole_kern.c +++ b/arch/um/drivers/mconsole_kern.c | |||
@@ -792,6 +792,8 @@ static int __init mconsole_init(void) | |||
792 | printk(KERN_ERR "Failed to initialize management console\n"); | 792 | printk(KERN_ERR "Failed to initialize management console\n"); |
793 | return 1; | 793 | return 1; |
794 | } | 794 | } |
795 | if (os_set_fd_block(sock, 0)) | ||
796 | goto out; | ||
795 | 797 | ||
796 | register_reboot_notifier(&reboot_notifier); | 798 | register_reboot_notifier(&reboot_notifier); |
797 | 799 | ||
@@ -800,7 +802,7 @@ static int __init mconsole_init(void) | |||
800 | "mconsole", (void *)sock); | 802 | "mconsole", (void *)sock); |
801 | if (err) { | 803 | if (err) { |
802 | printk(KERN_ERR "Failed to get IRQ for management console\n"); | 804 | printk(KERN_ERR "Failed to get IRQ for management console\n"); |
803 | return 1; | 805 | goto out; |
804 | } | 806 | } |
805 | 807 | ||
806 | if (notify_socket != NULL) { | 808 | if (notify_socket != NULL) { |
@@ -816,6 +818,10 @@ static int __init mconsole_init(void) | |||
816 | printk(KERN_INFO "mconsole (version %d) initialized on %s\n", | 818 | printk(KERN_INFO "mconsole (version %d) initialized on %s\n", |
817 | MCONSOLE_VERSION, mconsole_socket_name); | 819 | MCONSOLE_VERSION, mconsole_socket_name); |
818 | return 0; | 820 | return 0; |
821 | |||
822 | out: | ||
823 | os_close_file(sock); | ||
824 | return 1; | ||
819 | } | 825 | } |
820 | 826 | ||
821 | __initcall(mconsole_init); | 827 | __initcall(mconsole_init); |