================================================================== BUG: KCSAN: data-race in n_tty_flush_buffer / n_tty_lookahead_flow_ctrl write to 0xffffc9000c387270 of 8 bytes by task 25924 on cpu 1: reset_buffer_flags drivers/tty/n_tty.c:340 [inline] n_tty_flush_buffer+0x9b/0x180 drivers/tty/n_tty.c:371 tty_ldisc_hangup+0x72/0x470 drivers/tty/tty_ldisc.c:694 __tty_hangup+0x3e4/0x560 drivers/tty/tty_io.c:631 tty_vhangup+0x13/0x20 drivers/tty/tty_io.c:701 pty_close+0x25e/0x280 drivers/tty/pty.c:79 tty_release+0x200/0x960 drivers/tty/tty_io.c:1751 __fput+0x245/0x570 fs/file_table.c:320 ____fput+0x11/0x20 fs/file_table.c:348 task_work_run+0xde/0x110 kernel/task_work.c:179 get_signal+0xb00/0xc70 kernel/signal.c:2635 arch_do_signal_or_restart+0x85/0x290 arch/x86/kernel/signal.c:306 exit_to_user_mode_loop+0x78/0x130 kernel/entry/common.c:168 exit_to_user_mode_prepare kernel/entry/common.c:203 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline] syscall_exit_to_user_mode+0x6a/0x90 kernel/entry/common.c:296 do_syscall_64+0x37/0x70 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x63/0xcd read-write to 0xffffc9000c387270 of 8 bytes by task 45 on cpu 0: n_tty_lookahead_flow_ctrl+0x4f/0x2f0 drivers/tty/n_tty.c:1490 tty_port_default_lookahead_buf+0x81/0xb0 drivers/tty/tty_port.c:61 lookahead_bufs drivers/tty/tty_buffer.c:498 [inline] flush_to_ldisc+0x32d/0x460 drivers/tty/tty_buffer.c:568 process_one_work+0x3d3/0x720 kernel/workqueue.c:2289 worker_thread+0x618/0xa70 kernel/workqueue.c:2436 kthread+0x1a9/0x1e0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 value changed: 0x0000000000001dfe -> 0x0000000000000000 Reported by Kernel Concurrency Sanitizer on: CPU: 0 PID: 45 Comm: kworker/u4:3 Tainted: G W 6.2.0-rc4-syzkaller-00350-gedc00350d205-dirty #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023 Workqueue: events_unbound flush_to_ldisc ==================================================================