================================================================== BUG: KCSAN: data-race in n_tty_flush_buffer / n_tty_lookahead_flow_ctrl write to 0xffffc900002eb270 of 8 bytes by task 13337 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 drivers/tty/tty_io.c:701 [inline] tty_ioctl+0x46a/0x940 drivers/tty/tty_io.c:2715 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl+0xcb/0x140 fs/ioctl.c:856 __x64_sys_ioctl+0x3f/0x50 fs/ioctl.c:856 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd read-write to 0xffffc900002eb270 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: 0x000000000000119b -> 0x0000000000000000 Reported by Kernel Concurrency Sanitizer on: CPU: 0 PID: 45 Comm: kworker/u4:3 Tainted: G W 6.1.0-syzkaller-14321-g0a924817d2ed-dirty #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 Workqueue: events_unbound flush_to_ldisc ==================================================================