From: Jiri Slaby <jirislaby@kernel.org>
To: Zizhi Wo <wozizhi@huaweicloud.com>,
gregkh@linuxfoundation.org, npitre@baylibre.com
Cc: linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org,
yangerkun@huawei.com
Subject: Re: [PATCH -next] tty/vt: Add missing return value for VT_RESIZE in vt_ioctl()
Date: Mon, 8 Sep 2025 08:50:54 +0200 [thread overview]
Message-ID: <8b01bd0a-e8b3-4e9a-86fb-3005ff5351fd@kernel.org> (raw)
In-Reply-To: <20250904023955.3892120-1-wozizhi@huaweicloud.com>
On 04. 09. 25, 4:39, Zizhi Wo wrote:
> In vt_ioctl(), the handler for VT_RESIZE always returns 0, which prevents
> users from detecting errors. Add the missing return value so that errors
> can be properly reported to users like vt_resizex().
>
> Signed-off-by: Zizhi Wo <wozizhi@huaweicloud.com>
> ---
> drivers/tty/vt/vt_ioctl.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/tty/vt/vt_ioctl.c b/drivers/tty/vt/vt_ioctl.c
> index c9f11c4bd9fe..28993a3d0acb 100644
> --- a/drivers/tty/vt/vt_ioctl.c
> +++ b/drivers/tty/vt/vt_ioctl.c
> @@ -908,7 +908,9 @@ int vt_ioctl(struct tty_struct *tty,
>
> if (vc) {
> /* FIXME: review v tty lock */
> - __vc_resize(vc_cons[i].d, cc, ll, true);
> + ret = __vc_resize(vc_cons[i].d, cc, ll, true);
> + if (ret)
> + return ret;
The change looks good per se. But I wonder if userspace users do handle
or ignore errors? Have you checked any of them?
thanks,
--
js
suse labs
next prev parent reply other threads:[~2025-09-08 6:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-04 2:39 [PATCH -next] tty/vt: Add missing return value for VT_RESIZE in vt_ioctl() Zizhi Wo
2025-09-08 6:50 ` Jiri Slaby [this message]
2025-09-08 7:36 ` Zizhi Wo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8b01bd0a-e8b3-4e9a-86fb-3005ff5351fd@kernel.org \
--to=jirislaby@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=npitre@baylibre.com \
--cc=wozizhi@huaweicloud.com \
--cc=yangerkun@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox