[lkml]   [2007]   [Feb]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: buffer overflows in the tty flip buffer in 2.6.17
On Sat, Feb 17, 2007 at 03:29:31PM +0300, Mockern wrote:
> When data is received from the hardware, it needs to be placed into the tty device's flip buffer. This can be done with the following bit of code:
> for (i = 0; i < data_size; ++i) {
> if (tty->flip.count >= TTY_FLIPBUF_SIZE)
> tty_flip_buffer_push(tty);
> tty_insert_flip_char(tty, data[i], 0);
> }
> tty_flip_buffer_push(tty);
> This example makes sure there are no buffer overflows in the tty flip buffer as the data is being added.
> But how it is done in 2.6.17 linux kernel? I did check this "overflow code" in new tty driver's code. This code looks like just removed. But somehow overflow in the tty buffer must be kept.

Well there was a problem in 2.6.16, which was fixed by 2.6.18, although
I am not sure if it was done by 2.6.17. It would loose characters due
to buffer overflow and not properly checking under high load. I grabbed
a few patches from the git tree that were added after 2.6.16 to fix the
tty problems I was having.

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

 \ /
  Last update: 2007-02-17 16:21    [W:0.065 / U:2.268 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site