[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20081030155412.33d57ca0@lxorguk.ukuu.org.uk>
Date: Thu, 30 Oct 2008 15:54:12 +0000
From: Alan Cox <alan@...rguk.ukuu.org.uk>
To: Helge Hafting <helge.hafting@...el.hist.no>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: Linux 2.6.28-rc2 i/o error on /dev/ttyUSB0
On Wed, 29 Oct 2008 13:28:42 +0100
Helge Hafting <helge.hafting@...el.hist.no> wrote:
> Alan Cox wrote:
> >> squarely in the "oops, kref's are screwed up" corner, and you should talk
> >> to Alan about your particular USB dongle. I bet that bisection would just
> >> show you one of the kref commits (eg 4a90f09b "tty: usb-serial krefs" or
> >> maybe 7d7b93c14 "tty: kref the tty driver object").
Please try:
tty: Fix USB kref leak
From: Alan Cox <alan@...hat.com>
When we close we must clear the extra reference we got when we read
port->tty. Setting the port tty NULL will clear the kref held by the driver
but not the one we obtained ourselves while doing the lookup.
Signed-off-by: Alan Cox <alan@...hat.com>
---
drivers/usb/serial/usb-serial.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
index 8be3f39..794b5ff 100644
--- a/drivers/usb/serial/usb-serial.c
+++ b/drivers/usb/serial/usb-serial.c
@@ -281,6 +281,7 @@ static void serial_close(struct tty_struct *tty, struct file *filp)
if (tty->driver_data)
tty->driver_data = NULL;
tty_port_tty_set(&port->port, NULL);
+ tty_kref_put(tty);
}
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists