diff options
author | Jeff Dike <jdike@addtoit.com> | 2008-02-05 01:31:19 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-05 12:44:31 -0500 |
commit | 438ee6798cd8bfc44da725fca846367e19d86652 (patch) | |
tree | 5bf5ccfeb363f4a4c7f8dfb10d24c1c9a2062b8a /arch/um/drivers/mconsole_kern.c | |
parent | 83380cc1c9694a05bcdb7c95d293e99d3475d906 (diff) |
uml: DEBUG_SHIRQ fixes
A couple more DEBUG_SHIRQ fixes.
The previous mconsole blocking fix exposed the lack of O_NONBLOCK on the
mconsole socket.
Also, winch_interrupt started crashing because it is called at irq free time
and it tries to dereference tty->driver_data, which has already been set to
NULL.
I added some error cleanup in mconsole_init while I was there.
Cc: "Karol Swietlicki" <magotari@gmail.com>
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/um/drivers/mconsole_kern.c')
-rw-r--r-- | arch/um/drivers/mconsole_kern.c | 8 |
1 files changed, 7 insertions, 1 deletions
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); |