[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110322110708.642c568b@lxorguk.ukuu.org.uk>
Date: Tue, 22 Mar 2011 11:07:08 +0000
From: Alan Cox <alan@...rguk.ukuu.org.uk>
To: Oliver Neukum <oneukum@...e.de>
Cc: Toby Gray <toby.gray@...lvnc.com>,
"Greg Kroah-Hartman" <gregkh@...e.de>, linux-usb@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] USB: cdc-acm: Prevent data loss when filling tty
buffer.
On Tue, 22 Mar 2011 09:07:42 +0100
Oliver Neukum <oneukum@...e.de> wrote:
> Am Montag, 21. März 2011, 17:56:12 schrieb Alan Cox:
> > On Mon, 21 Mar 2011 15:52:25 +0000
> > Toby Gray <toby.gray@...lvnc.com> wrote:
> >
> > > 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.
> >
> > For a tty that is normally the right thing to do - no flow control was
> > asserted and the internal 64K of buffering was overrun so discard.
>
> But should we really randomly discard a part of a buffer?
> If this happens the better alternative approach would be to nuke all buffers
> we currently have.
If you have a stall on a PC eg a hard disk going through a fault sequence
and jamming up the CPU (as PATA can do so well) you don't want to discard
63K of perfectly good PPP frames just because you lost the following one.
It's also of course what the hardware itself does below us so the
behaviour isn't changing, we just provide a somewhat software extended
FIFO.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists