Re: [PATCH 01/02] hso patch to fix a -EIO from opening a hso serial device

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Alan Cox
Date: Wednesday, January 14, 2009 - 4:38 am

On Wed, 14 Jan 2009 12:22:31 +0100
Denis Joseph Barrow <D.Barow@option.com> wrote:


How about this. 

tty: Fix a kref leak in the HSO driver on re-open

From: Alan Cox <alan@redhat.com>


---

 drivers/net/usb/hso.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)


diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c
index c4918b8..9df04dd 100644
--- a/drivers/net/usb/hso.c
+++ b/drivers/net/usb/hso.c
@@ -1297,6 +1297,7 @@ static int hso_serial_open(struct tty_struct *tty, struct file *filp)
 	/* setup */
 	spin_lock_irq(&serial->serial_lock);
 	tty->driver_data = serial;
+	tty_kref_put(serial->tty);
 	serial->tty = tty_kref_get(tty);
 	spin_unlock_irq(&serial->serial_lock);
 
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 01/02] hso patch to fix a -EIO from opening a hso s ..., Denis Joseph Barrow, (Wed Jan 14, 4:22 am)
Re: [PATCH 01/02] hso patch to fix a -EIO from opening a h ..., Alan Cox, (Wed Jan 14, 4:38 am)
Re: [PATCH 01/02] hso patch to fix a -EIO from opening a h ..., Denis Joseph Barrow, (Wed Jan 14, 5:40 am)