All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Jiayi Zhang" <zhangjiayi1014@gmail.com>
Cc: linux-serial@vger.kernel.org
Subject: Re: [PATCH] tty: n_tty: hold termios_rwsem in n_tty_lookahead_flow_ctrl()
Date: Wed, 02 Dec 2026 18:18:01 +0000	[thread overview]
Message-ID: <sashiko-outbox-246424@kernel.org> (raw)
In-Reply-To: <20261202180854.4154340-1-zhangjiayi1014@gmail.com>

> syzbot reports a data race between the XON/XOFF lookahead and TCSETS:
> 
>   BUG: KCSAN: data-race in n_tty_lookahead_flow_ctrl / tty_set_termios
> 
>   write to 0xffff88811a4798e0 of 44 bytes by task 9666 on cpu 1:
>    tty_set_termios+0xc0/0x900 drivers/tty/tty_ioctl.c:335
>    set_termios+0x36e/0x4b0 drivers/tty/tty_ioctl.c:516
>    ...
>   read to 0xffff88811a4798fa of 1 bytes by task 9026 on cpu 0:
>    n_tty_is_char_flow_ctrl drivers/tty/n_tty.c:1196 [inline]
>    n_tty_receive_char_flow_ctrl drivers/tty/n_tty.c:1217 [inline]
>    n_tty_lookahead_flow_ctrl+0x1b0/0x2d0 drivers/tty/n_tty.c:1492
>    tty_port_default_lookahead_buf+0x91/0xc0 drivers/tty/tty_port.c:59
>    lookahead_bufs drivers/tty/tty_buffer.c:435 [inline]
>    flush_to_ldisc+0x28b/0x350 drivers/tty/tty_buffer.c:505
> [ ... ]
> Reported-by: syzbot+0479f67e520e4910d370@syzkaller.appspotmail.com
> Closes: https://syzkaller.appspot.com/bug?extid=0479f67e520e4910d370
> Reported-by: syzbot+2430ce6b487fe0119d03@syzkaller.appspotmail.com
> Closes: https://syzkaller.appspot.com/bug?extid=2430ce6b487fe0119d03
> Signed-off-by: Jiayi Zhang <zhangjiayi1014@gmail.com>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261202180854.4154340-1-zhangjiayi1014@gmail.com?part=1

      reply	other threads:[~2026-12-02 18:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-02 18:08 [PATCH] tty: n_tty: hold termios_rwsem in n_tty_lookahead_flow_ctrl() Jiayi Zhang
2026-12-02 18:18 ` 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-246424@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.