public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* buffer overflows in the tty flip buffer in 2.6.17
@ 2007-02-17 12:29 Mockern
  2007-02-17 13:14 ` Jiri Slaby
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Mockern @ 2007-02-17 12:29 UTC (permalink / raw)
  To: linux-kernel

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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-02-19 19:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-17 12:29 buffer overflows in the tty flip buffer in 2.6.17 Mockern
2007-02-17 13:14 ` Jiri Slaby
2007-02-17 15:17 ` Lennart Sorensen
2007-02-17 15:52   ` Mockern
2007-02-17 16:10     ` Lennart Sorensen
2007-02-19 20:19 ` Alan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox