From: Greg KH <greg-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
To: Jeff Garzik <jgarzik-e+AXbWqSrlAAvxtiuMwx3w@public.gmane.org>
Cc: netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Jari Tenhunen <jari.tenhunen-X3B1VOXEql0@public.gmane.org>,
Olivier Blin <blino-4qZELD6FgxhWk0Htik3J/w@public.gmane.org>,
Andrew Bird
<ajb-5+cxppFmGx6/3pe1ocb+s/XRex20P6io@public.gmane.org>,
Paul Rolland <rol-fjEKYshTNZ1eoWH0uzbU5w@public.gmane.org>,
Arjan van de Ven <arjan-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>,
Andrew Morton
<akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
Subject: [02/04] hso: fix refcounting on the ttyHSx devices
Date: Fri, 8 Aug 2008 12:01:41 -0700 [thread overview]
Message-ID: <20080808190141.GC2953@kroah.com> (raw)
In-Reply-To: <20080808190023.GA2953-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
From: Olivier Blin <blino-4qZELD6FgxhWk0Htik3J/w@public.gmane.org>
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-4qZELD6FgxhWk0Htik3J/w@public.gmane.org>
Cc: Jari Tenhunen <jari.tenhunen-X3B1VOXEql0@public.gmane.org>
Signed-off-by: Greg Kroah-Hartman <gregkh-l3A5Bk7waGM@public.gmane.org>
---
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 linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2008-08-08 19:01 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-08 19:00 [00/04] HSO driver bugfixes and updates Greg KH
2008-08-08 19:01 ` [01/04] hso: fix oops in read/write callbacks Greg KH
[not found] ` <20080808190023.GA2953-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2008-08-08 19:01 ` Greg KH [this message]
2008-08-09 8:39 ` [02/04] hso: fix refcounting on the ttyHSx devices Paul Rolland
2008-08-08 19:02 ` [03/04] USB: HSO: make tty_operations const Greg KH
2008-08-08 19:02 ` [04/04] USB: HSO: minor fixes due to code review Greg KH
2008-08-14 8:45 ` Jeff Garzik
2008-08-08 20:53 ` [00/04] HSO driver bugfixes and updates David Brownell
[not found] ` <200808081353.30130.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
2008-08-14 8:45 ` Jeff Garzik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080808190141.GC2953@kroah.com \
--to=greg-u8xffu+wg4eavxtiumwx3w@public.gmane.org \
--cc=ajb-5+cxppFmGx6/3pe1ocb+s/XRex20P6io@public.gmane.org \
--cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
--cc=arjan-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org \
--cc=blino-4qZELD6FgxhWk0Htik3J/w@public.gmane.org \
--cc=jari.tenhunen-X3B1VOXEql0@public.gmane.org \
--cc=jgarzik-e+AXbWqSrlAAvxtiuMwx3w@public.gmane.org \
--cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=rol-fjEKYshTNZ1eoWH0uzbU5w@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).