]> git.baikalelectronics.ru Git - kernel.git/commit
tty: Fix USB kref leak
authorAlan Cox <alan@redhat.com>
Thu, 30 Oct 2008 15:54:12 +0000 (15:54 +0000)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 30 Oct 2008 19:09:07 +0000 (12:09 -0700)
commit4c017d53601e7aa2f1bbbf643a73c096b51336c5
treecc272f4b863ebfb6595974feca28168cb59fc367
parent490a3168bfa0f9372a4b20b653c0a2321354e839
tty: Fix USB kref leak

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>
Tested-by: Helge Hafting <helge.hafting@aitel.hist.no>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/usb/serial/usb-serial.c