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>
This commit is contained in:

committed by
Richard Weinberger

parent
060ed31dd9
commit
6fc58845ad
@@ -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)
|
||||
|
Reference in New Issue
Block a user