[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8b01bd0a-e8b3-4e9a-86fb-3005ff5351fd@kernel.org>
Date: Mon, 8 Sep 2025 08:50:54 +0200
From: Jiri Slaby <jirislaby@...nel.org>
To: Zizhi Wo <wozizhi@...weicloud.com>, gregkh@...uxfoundation.org,
npitre@...libre.com
Cc: linux-kernel@...r.kernel.org, linux-serial@...r.kernel.org,
yangerkun@...wei.com
Subject: Re: [PATCH -next] tty/vt: Add missing return value for VT_RESIZE in
vt_ioctl()
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@...weicloud.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
Powered by blists - more mailing lists