diff options
author | Jiri Slaby <jslaby@suse.cz> | 2012-06-04 13:35:27 +0200 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2012-07-28 17:47:58 +0200 |
commit | 6fc58845ad189f8ceebd68a2ff524bfcd689a75e (patch) | |
tree | 7acc1ed13ec6427bf80f9ef3bf6eb4be0119663d /arch/um/drivers/chan_kern.c | |
parent | 060ed31dd9ede0726f8c88aff36c6cd8ec6d0fe8 (diff) |
TTY: um/line, use tty from tty_port
This means switching to the tty refcounted model so that we will not
race with interrupts.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Richard Weinberger <richard@nod.at>
Cc: user-mode-linux-devel@lists.sourceforge.net
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch/um/drivers/chan_kern.c')
-rw-r--r-- | arch/um/drivers/chan_kern.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/um/drivers/chan_kern.c b/arch/um/drivers/chan_kern.c index 45e248c2f43c..87eebfe03c61 100644 --- a/arch/um/drivers/chan_kern.c +++ b/arch/um/drivers/chan_kern.c @@ -150,9 +150,11 @@ void chan_enable_winch(struct chan *chan, struct tty_struct *tty) static void line_timer_cb(struct work_struct *work) { struct line *line = container_of(work, struct line, task.work); + struct tty_struct *tty = tty_port_tty_get(&line->port); if (!line->throttled) - chan_interrupt(line, line->tty, line->driver->read_irq); + chan_interrupt(line, tty, line->driver->read_irq); + tty_kref_put(tty); } int enable_chan(struct line *line) |