Re: [PATCH] USB: cdc-acm: Prevent data loss when filling tty buffer.

From: Oliver Neukum
Date: Tue Mar 22 2011 - 03:43:10 EST

Am Montag, 21. März 2011, 16:52:25 schrieb Toby Gray:
> When sending large quantities of data through a CDC ACM channel it is possible
> for data to be lost when attempting to copy the data to the tty buffer. This
> occurs due to the return value from tty_insert_flip_string not being checked.
> This patch adds checking for how many bytes have been inserted into the tty
> buffer and returns any remaining bytes back to the filled read buffer list.

Have you tested whether the driver recovers from running out of buffers?
Other than that it is looking good to me.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at