================================================================== BUG: KCSAN: data-race in n_tty_flush_buffer / n_tty_lookahead_flow_ctrl write to 0xffffc9000dd8f270 of 8 bytes by task 5392 on cpu 0: 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+0x3c6/0x520 drivers/tty/tty_io.c:632 tty_vhangup drivers/tty/tty_io.c:702 [inline] tty_ioctl+0x60a/0xbc0 drivers/tty/tty_io.c:2726 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl+0xcf/0x140 fs/ioctl.c:856 __x64_sys_ioctl+0x43/0x50 fs/ioctl.c:856 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd read-write to 0xffffc9000dd8f270 of 8 bytes by task 3228 on cpu 1: 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+0x434/0x860 kernel/workqueue.c:2597 worker_thread+0x5f2/0xa10 kernel/workqueue.c:2748 kthread+0x1d7/0x210 kernel/kthread.c:389 ret_from_fork+0x2e/0x40 arch/x86/kernel/process.c:145 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:296 value changed: 0x0000000000002c9d -> 0x0000000000000000 Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 3228 Comm: kworker/u4:7 Not tainted 6.5.0-rc3-syzkaller-00024-g18b44bc5a672 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2023 Workqueue: events_unbound flush_to_ldisc ==================================================================