================================================================== BUG: KCSAN: data-race in n_tty_flush_buffer / n_tty_lookahead_flow_ctrl write to 0xffffc900001c9270 of 8 bytes by task 16944 on cpu 0: reset_buffer_flags drivers/tty/n_tty.c:328 [inline] n_tty_flush_buffer+0xaa/0x190 drivers/tty/n_tty.c:359 tty_ldisc_hangup+0x72/0x370 drivers/tty/tty_ldisc.c:699 __tty_hangup+0x3b1/0x530 drivers/tty/tty_io.c:624 tty_vhangup+0x17/0x20 drivers/tty/tty_io.c:694 pty_close+0x262/0x280 drivers/tty/pty.c:79 tty_release+0x206/0x930 drivers/tty/tty_io.c:1754 __fput+0x2ac/0x640 fs/file_table.c:465 ____fput+0x1c/0x30 fs/file_table.c:493 task_work_run+0x13c/0x1b0 kernel/task_work.c:227 get_signal+0xe81/0x1000 kernel/signal.c:2808 arch_do_signal_or_restart+0x9a/0x4b0 arch/x86/kernel/signal.c:337 exit_to_user_mode_loop kernel/entry/common.c:111 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0x62/0x120 kernel/entry/common.c:218 do_syscall_64+0xd6/0x1c0 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f read-write to 0xffffc900001c9270 of 8 bytes by task 12982 on cpu 1: n_tty_lookahead_flow_ctrl+0x48/0x130 drivers/tty/n_tty.c:1507 tty_port_default_lookahead_buf+0x8a/0xc0 drivers/tty/tty_port.c:59 lookahead_bufs drivers/tty/tty_buffer.c:428 [inline] flush_to_ldisc+0x322/0x410 drivers/tty/tty_buffer.c:498 process_one_work kernel/workqueue.c:3238 [inline] process_scheduled_works+0x4de/0xa20 kernel/workqueue.c:3319 worker_thread+0x52c/0x710 kernel/workqueue.c:3400 kthread+0x4b7/0x540 kernel/kthread.c:464 ret_from_fork+0x4b/0x60 arch/x86/kernel/process.c:153 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 value changed: 0x0000000000003000 -> 0x0000000000000000 Reported by Kernel Concurrency Sanitizer on: CPU: 1 UID: 0 PID: 12982 Comm: kworker/u8:13 Not tainted 6.14.0-syzkaller-09584-g7d06015d936c #0 PREEMPT(voluntary) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025 Workqueue: events_unbound flush_to_ldisc ==================================================================