Commit 5839b414 authored by Denis Joseph Barrow's avatar Denis Joseph Barrow Committed by Linus Torvalds
Browse files

hso serial throttled tty kref fix.



This patch is for Alan Cox as it related to the tty layer.
Hopefully the hso driver is again relatively stable with this fix.

Signed-off-by: default avatarDenis Joseph Barrow <D.Barow@option.com>
Signed-off-by: default avatarAlan Cox <alan@redhat.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent d45eb81c
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -2053,8 +2053,10 @@ static int put_rxbuf_data(struct urb *urb, struct hso_serial *serial)
			serial->curr_rx_urb_offset;
		D1("data to push to tty");
		while (write_length_remaining) {
			if (test_bit(TTY_THROTTLED, &tty->flags))
			if (test_bit(TTY_THROTTLED, &tty->flags)) {
				tty_kref_put(tty);
				return -1;
			}
			curr_write_len =  tty_insert_flip_string
				(tty, urb->transfer_buffer +
				 serial->curr_rx_urb_offset,