Re: [PATCH] tty: discard flip-buffer input for TCSAFLUSH

From: Hungyu Lin

Date: Tue Oct 27 2026 - 12:40:29 EST


> What is going to break with this change?

I missed that a throttled VT paste can hold the buffer lock and
block TCSAFLUSH.

> Why change this at all at this point in time?

I noticed the mismatch with the documented TCSAFLUSH behavior while
reviewing the code and thought it was a small fix.

> What needs this fix?

I don't have an application failure to point to.

> And how was this found and tested?

Found while reviewing set_termios(). The test completes an 8192-byte
master write to a raw PTY, waits for 4095 unread bytes on the slave,
then calls TCSAFLUSH there. It leaves 4097 bytes before the patch and
none afterwards. That PTY test didn't cover this VT interaction.

Thanks,
Hungyu