================================================================== BUG: KCSAN: data-race in n_tty_flush_buffer / n_tty_lookahead_flow_ctrl write to 0xffffc90002eb7270 of 8 bytes by task 3760 on cpu 0: reset_buffer_flags drivers/tty/n_tty.c:322 [inline] n_tty_flush_buffer+0xa8/0x180 drivers/tty/n_tty.c:353 tty_ldisc_hangup+0x77/0x370 drivers/tty/tty_ldisc.c:699 __tty_hangup+0x3c2/0x540 drivers/tty/tty_io.c:621 tty_vhangup+0x17/0x20 drivers/tty/tty_io.c:691 pty_close+0x266/0x290 drivers/tty/pty.c:79 tty_release+0x1fc/0xb10 drivers/tty/tty_io.c:1745 __fput+0x29b/0x650 fs/file_table.c:468 ____fput+0x1c/0x30 fs/file_table.c:496 task_work_run+0x12e/0x1a0 kernel/task_work.c:227 get_signal+0xe13/0xf70 kernel/signal.c:2807 arch_do_signal_or_restart+0x96/0x480 arch/x86/kernel/signal.c:337 exit_to_user_mode_loop+0x7a/0x100 kernel/entry/common.c:40 exit_to_user_mode_prepare include/linux/irq-entry-common.h:225 [inline] syscall_exit_to_user_mode_work include/linux/entry-common.h:175 [inline] syscall_exit_to_user_mode include/linux/entry-common.h:210 [inline] do_syscall_64+0x1d6/0x200 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f read-write to 0xffffc90002eb7270 of 8 bytes by task 12 on cpu 1: n_tty_lookahead_flow_ctrl+0x48/0x130 drivers/tty/n_tty.c:1491 tty_port_default_lookahead_buf+0x91/0xc0 drivers/tty/tty_port.c:59 lookahead_bufs drivers/tty/tty_buffer.c:428 [inline] flush_to_ldisc+0x285/0x340 drivers/tty/tty_buffer.c:498 process_one_work kernel/workqueue.c:3236 [inline] process_scheduled_works+0x4cb/0x9d0 kernel/workqueue.c:3319 worker_thread+0x582/0x770 kernel/workqueue.c:3400 kthread+0x489/0x510 kernel/kthread.c:463 ret_from_fork+0x11f/0x1b0 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 value changed: 0x000000000000243e -> 0x0000000000000000 Reported by Kernel Concurrency Sanitizer on: CPU: 1 UID: 0 PID: 12 Comm: kworker/u8:0 Not tainted syzkaller #0 PREEMPT(voluntary) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/18/2025 Workqueue: events_unbound flush_to_ldisc ==================================================================