summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDenis Joseph Barrow <D.Barow@option.com>2009-01-15 14:31:34 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2009-01-15 21:48:36 +0100
commit5839b414f9f9d2d6a471988763b61dbf85eb2dba (patch)
tree5ce869b94d082023ff87f8432fae8b45b33b9b1f /drivers
parenttty: Fix double grabbing of a spinlock (diff)
downloadlinux-5839b414f9f9d2d6a471988763b61dbf85eb2dba.tar.xz
linux-5839b414f9f9d2d6a471988763b61dbf85eb2dba.zip
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: Denis Joseph Barrow <D.Barow@option.com> Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/usb/hso.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c
index e25a58f6ff69..6478bf63f289 100644
--- a/drivers/net/usb/hso.c
+++ b/drivers/net/usb/hso.c
@@ -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,