Skip to content

Commit

Permalink
hso serial throttled tty kref fix.
Browse files Browse the repository at this point in the history
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: Denis Joseph Barrow <D.Barow@option.com>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Denis Joseph Barrow authored and Linus Torvalds committed Jan 15, 2009
1 parent d45eb81 commit 5839b41
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/net/usb/hso.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 5839b41

Please sign in to comment.