The patch titled hso: fix refcounting on the ttyHSx devices has been added to the -mm tree. Its filename is hso-fix-refcounting-on-the-ttyhsx-devices.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: hso: fix refcounting on the ttyHSx devices From: Olivier Blin <blino@xxxxxxxxxxxx> 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@xxxxxxxxxxxx> Cc: Jari Tenhunen <jari.tenhunen@xxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/net/usb/hso.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -puN drivers/net/usb/hso.c~hso-fix-refcounting-on-the-ttyhsx-devices drivers/net/usb/hso.c --- a/drivers/net/usb/hso.c~hso-fix-refcounting-on-the-ttyhsx-devices +++ a/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; _ Patches currently in -mm which might be from blino@xxxxxxxxxxxx are hso-fix-oops-in-read-write-callbacks.patch hso-fix-refcounting-on-the-ttyhsx-devices.patch git-unionfs.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html