diff options
author | Jim Sung <jsung@syncadence.com> | 2010-11-04 18:47:51 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-11-11 07:03:48 -0800 |
commit | 28609d4083bcd4879e951b0c4ecf4c3a88761261 (patch) | |
tree | c5b5863370ca4ee125e44ffcaa5f1afe86986fdf /drivers/usb/misc/sisusbvga | |
parent | 58c0d9d70109bd7e82bdb9517007311a48499960 (diff) | |
download | kernel_samsung_crespo-28609d4083bcd4879e951b0c4ecf4c3a88761261.zip kernel_samsung_crespo-28609d4083bcd4879e951b0c4ecf4c3a88761261.tar.gz kernel_samsung_crespo-28609d4083bcd4879e951b0c4ecf4c3a88761261.tar.bz2 |
usb: subtle increased memory usage in u_serial
OK, the USB gadget serial driver actually has a couple of problems. On
gs_open(), it always allocates and queues an additional QUEUE_SIZE (16)
worth of requests, so with a loop like this:
i=1 ; while echo $i > /dev/ttyGS0 ; do let i++ ; done
eventually we run into OOM (Out of Memory).
Technically, it is not a leak as everything gets freed up when the USB
connection is broken, but not on gs_close().
With a USB device/gadget controller driver that has limited resources
(e.g., Marvell has a this MAX_XDS_FOR_TR_CALLS of 64 for transmit and
receive), so even after 4
stty -F /dev/ttyGS0
we cannot transmit anymore. We can still receive (not necessarily
reliably) as now we have 16 * 4 = 64 descriptors/buffers ready, but the
device is otherwise not usable.
Signed-off-by: Jim Sung <jsung@syncadence.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/misc/sisusbvga')
0 files changed, 0 insertions, 0 deletions