summaryrefslogtreecommitdiff
path: root/arch/um/drivers/line.c
diff options
context:
space:
mode:
authorJeff Dike <jdike@addtoit.com>2008-02-04 22:31:19 -0800
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-05 09:44:31 -0800
commit438ee6798cd8bfc44da725fca846367e19d86652 (patch)
tree5bf5ccfeb363f4a4c7f8dfb10d24c1c9a2062b8a /arch/um/drivers/line.c
parent83380cc1c9694a05bcdb7c95d293e99d3475d906 (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/line.c')
-rw-r--r--arch/um/drivers/line.c8
1 files changed, 5 insertions, 3 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)
tty = winch->tty;
if (tty != NULL) {
line = tty->driver_data;
- chan_window_size(&line->chan_list, &tty->winsize.ws_row,
- &tty->winsize.ws_col);
- kill_pgrp(tty->pgrp, SIGWINCH, 1);
+ if (line != NULL) {
+ chan_window_size(&line->chan_list, &tty->winsize.ws_row,
+ &tty->winsize.ws_col);
+ kill_pgrp(tty->pgrp, SIGWINCH, 1);
+ }
}
out:
if (winch->fd != -1)