Re: [Regression] kdesu broken

From: Alan Cox
Date: Sat Jul 25 2009 - 11:32:38 EST


On Sat, 25 Jul 2009 23:55:39 +0900
OGAWA Hirofumi <hirofumi@xxxxxxxxxxxxxxxxxx> wrote:

> Alan Cox <alan@xxxxxxxxxxxxxxxxxxx> writes:
>
> > Actually try this:
>
> Thanks. This patch improved situation. However, if slave writes big data
> to buffer, it seems we still have the problem.
>
> > + tty_flip_buffer_push(tty->link);
>
> This is handling the pending buffer, but in flush_to_ldisc(), if
> !tty->receive_room, it seems still delay the ->receive_buf().

Agreed - we could

wait_event_interruptible(tty->write_wait,
tty->link->receive_room);

or similar.

Good to know the initial fix works. To actually do it cleanly probably
wants a way to pass a logical channel close through the tty layer which
isn't I think too hard

set a new TTY_OTHER_CLOSING in the pty code
set TTY_OTHER_CLOSED in the flip_buffer_push code if we empty the
buffer queue and TTY_OTHER_CLOSING is set.

That would also avoid using tty->low_latency=1 in the pty layer which I
worry may harm PPP gateway performance and the like.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/