================================================================== BUG: KCSAN: data-race in n_tty_flush_buffer / n_tty_lookahead_flow_ctrl write to 0xffffc9000082b270 of 8 bytes by task 8046 on cpu 1: reset_buffer_flags drivers/tty/n_tty.c:339 [inline] n_tty_flush_buffer+0x9f/0x180 drivers/tty/n_tty.c:370 tty_ldisc_hangup+0x6e/0x360 drivers/tty/tty_ldisc.c:693 __tty_hangup+0x3ba/0x510 drivers/tty/tty_io.c:631 tty_vhangup+0x17/0x20 drivers/tty/tty_io.c:701 pty_close+0x262/0x280 drivers/tty/pty.c:79 tty_release+0x204/0x930 drivers/tty/tty_io.c:1753 __fput+0x245/0x570 fs/file_table.c:321 ____fput+0x15/0x20 fs/file_table.c:349 task_work_run+0x123/0x160 kernel/task_work.c:179 get_signal+0xe64/0xff0 kernel/signal.c:2650 arch_do_signal_or_restart+0x89/0x2a0 arch/x86/kernel/signal.c:306 exit_to_user_mode_loop+0x6f/0xe0 kernel/entry/common.c:168 exit_to_user_mode_prepare+0x6c/0xb0 kernel/entry/common.c:204 __syscall_exit_to_user_mode_work kernel/entry/common.c:286 [inline] syscall_exit_to_user_mode+0x26/0x140 kernel/entry/common.c:297 do_syscall_64+0x4d/0xc0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x63/0xcd read-write to 0xffffc9000082b270 of 8 bytes by task 44 on cpu 0: n_tty_lookahead_flow_ctrl+0x46/0x120 drivers/tty/n_tty.c:1489 tty_port_default_lookahead_buf+0x85/0xb0 drivers/tty/tty_port.c:61 lookahead_bufs drivers/tty/tty_buffer.c:498 [inline] flush_to_ldisc+0x30a/0x400 drivers/tty/tty_buffer.c:568 process_one_work+0x3e6/0x750 kernel/workqueue.c:2405 worker_thread+0x5f2/0xa10 kernel/workqueue.c:2552 kthread+0x1d7/0x210 kernel/kthread.c:379 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 value changed: 0x0000000000002003 -> 0x0000000000000000 Reported by Kernel Concurrency Sanitizer on: CPU: 0 PID: 44 Comm: kworker/u4:3 Not tainted 6.3.0-syzkaller-12423-g865fdb08197e #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/14/2023 Workqueue: events_unbound flush_to_ldisc ==================================================================