projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
05ff0e2
)
usbserial: Reference leak
author
Matthias Urlichs
<smurf@smurf.noris.de>
Mon, 11 Sep 2006 10:35:20 +0000
(12:35 +0200)
committer
Greg Kroah-Hartman
<gregkh@suse.de>
Tue, 12 Sep 2006 10:10:20 +0000
(
03:10
-0700)
A sufficiently-large number of USB serial devices causes a reference leak
when /proc/tty/drivers/usbserial is read.
Signed-Off-By: Matthias Urlichs <smurf@smurf.noris.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/serial/usb-serial.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/usb/serial/usb-serial.c
b/drivers/usb/serial/usb-serial.c
index 12c1694d322ef3fa55650a0950c97779df1f68d4..e06a41bd0f3ba4b458aaf11470c901965cff7710 100644
(file)
--- a/
drivers/usb/serial/usb-serial.c
+++ b/
drivers/usb/serial/usb-serial.c
@@
-464,8
+464,10
@@
static int serial_read_proc (char *page, char **start, off_t off, int count, int
length += sprintf (page+length, " path:%s", tmp);
length += sprintf (page+length, "\n");
- if ((length + begin) > (off + count))
+ if ((length + begin) > (off + count)) {
+ usb_serial_put(serial);
goto done;
+ }
if ((length + begin) < off) {
begin += length;
length = 0;