diff options
| author | Fabian Vogt <fvogt@suse.de> | 2025-08-15 13:33:28 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-10-02 13:39:02 +0200 |
| commit | d91604c39b74c7697e65194b74ab29c27a318a7d (patch) | |
| tree | 1d30b62d6a63ec570fbc75fed917caa249820ac3 /drivers/tty | |
| parent | 9cf2429fe6cbbb1b84affe583bb37f28eb192c6a (diff) | |
| download | linux-d91604c39b74c7697e65194b74ab29c27a318a7d.tar.gz linux-d91604c39b74c7697e65194b74ab29c27a318a7d.tar.bz2 linux-d91604c39b74c7697e65194b74ab29c27a318a7d.zip | |
tty: hvc_console: Call hvc_kick in hvc_write unconditionally
commit cfd956dcb101aa3d25bac321fae923323a47c607 upstream.
After hvc_write completes, call hvc_kick also in the case the output
buffer has been drained, to ensure tty_wakeup gets called.
This fixes that functions which wait for a drained buffer got stuck
occasionally.
Cc: stable <stable@kernel.org>
Closes: https://bugzilla.opensuse.org/show_bug.cgi?id=1230062
Signed-off-by: Fabian Vogt <fvogt@suse.de>
Link: https://lore.kernel.org/r/2011735.PYKUYFuaPT@fvogt-thinkpad
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
| -rw-r--r-- | drivers/tty/hvc/hvc_console.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/tty/hvc/hvc_console.c b/drivers/tty/hvc/hvc_console.c index 7b30d5a05e2f..1aeb88896b13 100644 --- a/drivers/tty/hvc/hvc_console.c +++ b/drivers/tty/hvc/hvc_console.c @@ -543,10 +543,10 @@ static int hvc_write(struct tty_struct *tty, const unsigned char *buf, int count } /* - * Racy, but harmless, kick thread if there is still pending data. + * Kick thread to flush if there's still pending data + * or to wakeup the write queue. */ - if (hp->n_outbuf) - hvc_kick(); + hvc_kick(); return written; } |
