Jim Sung
28609d4083
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>
2010-11-11 07:03:48 -08:00
..
2010-10-22 10:22:19 -07:00
2007-07-19 17:46:05 -07:00
2010-10-24 13:41:39 -07:00
2010-07-18 20:39:10 +01:00
2010-10-22 10:21:47 -07:00
2010-03-02 14:54:57 -08:00
2010-10-22 10:21:26 -07:00
2010-10-22 10:21:26 -07:00
2010-10-22 10:21:25 -07:00
2009-01-07 09:59:58 -08:00
2010-10-22 10:21:37 -07:00
2010-05-20 13:21:43 -07:00
2010-10-22 10:21:25 -07:00
2010-10-22 10:22:06 -07:00
2010-05-20 13:21:43 -07:00
2010-10-22 10:21:26 -07:00
2010-10-22 10:21:35 -07:00
2010-08-10 14:25:42 +02:00
2010-05-20 13:21:43 -07:00
2010-06-30 08:16:06 -07:00
2010-10-29 04:16:28 -04:00
2010-10-24 13:41:39 -07:00
2010-10-22 10:21:26 -07:00
2010-10-22 10:22:07 -07:00
2010-03-30 22:02:32 +09:00
2010-03-30 22:02:32 +09:00
2010-05-20 13:21:43 -07:00
2010-03-30 22:02:32 +09:00
2010-10-22 10:21:26 -07:00
2010-03-30 22:02:32 +09:00
2010-08-02 16:43:15 -03:00
2010-08-02 16:43:15 -03:00
2010-10-22 10:22:07 -07:00
2010-10-22 10:22:17 -07:00
2010-10-22 10:21:25 -07:00
2009-11-11 21:43:20 -06:00
2010-10-24 13:41:39 -07:00
2009-06-15 21:44:47 -07:00
2010-10-22 10:21:26 -07:00
2009-03-24 16:20:45 -07:00
2010-03-19 07:24:22 -07:00
2010-10-22 10:21:25 -07:00
2010-10-22 10:22:04 -07:00
2010-11-11 06:57:24 -08:00
2010-10-22 10:21:26 -07:00
2010-10-22 10:21:25 -07:00
2009-03-24 16:20:29 -07:00
2010-10-29 04:16:28 -04:00
2010-11-11 06:55:35 -08:00
2010-10-22 10:22:00 -07:00
2010-10-22 10:21:19 -07:00
2010-10-22 10:21:25 -07:00
2008-08-07 09:55:48 +01:00
2010-10-22 10:21:25 -07:00
2010-06-02 16:26:13 +09:00
2010-10-22 10:22:07 -07:00
2010-10-22 10:21:26 -07:00
2010-10-22 10:21:26 -07:00
2008-07-21 15:16:10 -07:00
2010-10-22 10:21:25 -07:00
2008-10-17 14:40:52 -07:00
2010-10-22 10:21:26 -07:00
2010-10-25 13:46:56 -07:00
2008-07-25 10:53:29 -07:00
2010-10-22 20:30:48 -07:00
2010-10-22 10:21:25 -07:00
2009-09-23 06:46:23 -07:00
2010-10-24 13:41:39 -07:00
2010-05-20 13:21:36 -07:00
2010-10-22 10:22:18 -07:00
2010-10-22 10:21:34 -07:00
2010-10-24 13:41:39 -07:00
2010-09-03 17:33:40 -07:00
2010-10-22 10:21:25 -07:00
2007-07-12 16:34:30 -07:00
2010-10-22 10:21:25 -07:00
2010-10-22 10:21:26 -07:00
2010-10-22 10:22:07 -07:00
2010-03-30 22:02:32 +09:00
2009-12-23 11:34:20 -08:00
2010-11-01 09:33:53 -07:00
2010-03-02 14:54:57 -08:00
2008-12-17 15:49:09 -08:00
2010-11-11 07:03:48 -08:00
2008-10-17 14:40:53 -07:00
2009-05-08 19:34:56 -07:00
2010-07-11 17:45:10 -03:00
2010-07-11 17:45:10 -03:00
2010-08-23 20:50:14 -07:00
2010-07-11 17:45:10 -03:00
2010-08-02 16:43:15 -03:00
2010-10-22 10:21:26 -07:00
2010-10-22 10:21:25 -07:00