Messages in this thread Patch in this message | | | Date | Thu, 30 Oct 2008 15:54:12 +0000 | From | Alan Cox <> | 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@aitel.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@redhat.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@redhat.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); } }
| |