Message ID | 20210222121018.841201057@linuxfoundation.org |
---|---|
State | New |
Headers | show |
Series | None | expand |
--- a/drivers/tty/tty_io.c +++ b/drivers/tty/tty_io.c @@ -962,11 +962,14 @@ static inline ssize_t do_tty_write( if (ret <= 0) break; + written += ret; + if (ret > size) + break; + /* FIXME! Have Al check this! */ if (ret != size) iov_iter_revert(from, size-ret); - written += ret; count -= ret; if (!count) break;