From: sashiko-bot@kernel.org
To: "Jiayi Zhang" <zhangjiayi1014@gmail.com>
Cc: linux-serial@vger.kernel.org
Subject: Re: [PATCH v2] vt: drop console_lock before calling __do_SAK() in vc_SAK()
Date: Fri, 04 Dec 2026 06:08:12 +0000 [thread overview]
Message-ID: <sashiko-outbox-249186@kernel.org> (raw)
In-Reply-To: <20261204055437.1902380-1-zhangjiayi1014@gmail.com>
> vc_SAK() calls __do_SAK() on the console's tty with console_lock held.
> __do_SAK() flushes the tty, and tty_buffer_flush() takes the buffer
> lock of the tty. flush_to_ldisc() holds that buffer lock while it
> passes input to the line discipline, and n_tty calls con_flush_chars(),
> which takes console_lock, after each batch of input:
>
> vc_SAK() flush_to_ldisc()
> console_lock() mutex_lock(&buf->lock)
> __do_SAK() n_tty_receive_buf_common()
> tty_ldisc_flush() con_flush_chars()
> tty_buffer_flush() console_lock()
> mutex_lock(&buf->lock)
>
> So a SAK on a virtual console that is receiving input can deadlock.
> syzbot reports this dependency (console_lock -> &buf->lock) as part of
> [ ... ]
> Reported-by: syzbot+52cf91760dcb1dac6376@syzkaller.appspotmail.com
> Closes: https://syzkaller.appspot.com/bug?extid=52cf91760dcb1dac6376
> Reported-by: syzbot+d84934b4184d7f9a1aed@syzkaller.appspotmail.com
> Closes: https://syzkaller.appspot.com/bug?extid=d84934b4184d7f9a1aed
> Signed-off-by: Jiayi Zhang <zhangjiayi1014@gmail.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261204055437.1902380-1-zhangjiayi1014@gmail.com?part=1
prev parent reply other threads:[~2026-12-04 6:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-04 5:54 [PATCH v2] vt: drop console_lock before calling __do_SAK() in vc_SAK() Jiayi Zhang
2026-12-04 6:08 ` sashiko-bot [this message]
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=sashiko-outbox-249186@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=zhangjiayi1014@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.