[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 8 Aug 2008 12:01:41 -0700
From: Greg KH <greg@...ah.com>
To: Jeff Garzik <jgarzik@...ox.com>
Cc: netdev@...r.kernel.org, linux-usb@...r.kernel.org,
Jari Tenhunen <jari.tenhunen@....fi>,
Olivier Blin <blino@...driva.com>,
Andrew Bird <ajb@...eresystems.co.uk>,
Paul Rolland <rol@...be.net>,
Arjan van de Ven <arjan@...radead.org>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: [02/04] hso: fix refcounting on the ttyHSx devices
From: Olivier Blin <blino@...driva.com>
The references on ttyHSx devices were not decremented correctly when
the tty was closed. The helper freeing the serial devices was never
called because of that, and the module left some dangling sysfs
devices after being unloaded.
Signed-off-by: Olivier Blin <blino@...driva.com>
Cc: Jari Tenhunen <jari.tenhunen@....fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@...e.de>
---
drivers/net/usb/hso.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/net/usb/hso.c
+++ b/drivers/net/usb/hso.c
@@ -1103,8 +1103,8 @@ static void hso_serial_close(struct tty_
/* reset the rts and dtr */
/* do the actual close */
serial->open_count--;
+ kref_put(&serial->parent->ref, hso_serial_ref_free);
if (serial->open_count <= 0) {
- kref_put(&serial->parent->ref, hso_serial_ref_free);
serial->open_count = 0;
if (serial->tty) {
serial->tty->driver_data = NULL;
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists