Skip to contentSkip to conversation

hso serial throttled tty kref fix.

PATCH In review Denis Joseph Barrow 2 participants 2 messages Jan 15, 2009 1 message not in the archive

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hso serial throttled tty kref fix.

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

---

drivers/net/usb/hso.c +3 -1
Index: linux-2.6/drivers/net/usb/hso.c
===================================================================
@@ -2040,8 +2040,10 @@
 			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,
Signature · 13 lines
best regards,
D.J. Barrow

Linux Kernel Developer
Option NV, Gaston Geenslaan 14, 3001 Leuven, Belgium
 
T: +32 16 311 621
F: +32 16 207 164
[email protected]
www.option.com

Disclaimer:
http://www.option.com/company/disclaimer.shtml

Fixes a missed tty_kref_put which is caused the driver to fail to unloading when rmmoded if the hso serial port ever gets throttled.

---

drivers/net/usb/hso.c +3 -1
Index: linux-2.6/drivers/net/usb/hso.c
===================================================================
@@ -2040,8 +2040,10 @@
 			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,

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw
Quoted 3 lines · On Thu, 15 Jan 2009 13:10:33 +0100 Denis Joseph Barrow…

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

ACK - hso conversion does not seem to have been my finest hour

Sorry about that.

Alan
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html