Skip to content

Commit

Permalink
TTY: Report warning when low_latency flag is wrongly used
Browse files Browse the repository at this point in the history
When a driver has the low_latency flag set and uses the schedule_flip()
function to initiate copying data to the line discipline, a workqueue is
scheduled in but never actually flushed. This is incorrect use of the
low_latency flag (driver should not support the low_latency flag, or use
the tty_flip_buffer_push() function instead). Make sure a warning is
reported to catch incorrect use of the low_latency flag.

This patch goes with: cee4ad1

Signed-off-by: Ivo Sieben <meltedpianoman@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Ivo Sieben authored and Greg Kroah-Hartman committed Oct 24, 2012
1 parent 6b898c0 commit b8b345b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/tty/tty_buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,7 @@ void tty_schedule_flip(struct tty_struct *tty)
{
struct tty_bufhead *buf = &tty->port->buf;
unsigned long flags;
WARN_ON(tty->low_latency);

spin_lock_irqsave(&buf->lock, flags);
if (buf->tail != NULL)
Expand Down

0 comments on commit b8b345b

Please sign in to comment.