================================================================== BUG: KCSAN: data-race in n_tty_write / tty_reopen read-write to 0xffff88817e9b15a8 of 4 bytes by task 11372 on cpu 0: tty_reopen+0x10c/0x1b0 drivers/tty/tty_io.c:1371 tty_open_by_driver drivers/tty/tty_io.c:2082 [inline] tty_open+0x8f4/0xb00 drivers/tty/tty_io.c:2135 chrdev_open+0x322/0x390 fs/char_dev.c:414 do_dentry_open+0x637/0xbd0 fs/open.c:953 vfs_open+0x4a/0x50 fs/open.c:1087 do_open fs/namei.c:3641 [inline] path_openat+0x1821/0x1d40 fs/namei.c:3798 do_filp_open+0xf6/0x200 fs/namei.c:3825 do_sys_openat2+0xab/0x110 fs/open.c:1404 do_sys_open fs/open.c:1419 [inline] __do_sys_openat fs/open.c:1435 [inline] __se_sys_openat fs/open.c:1430 [inline] __x64_sys_openat+0xf3/0x120 fs/open.c:1430 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x1d0 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b read to 0xffff88817e9b15a8 of 4 bytes by task 11370 on cpu 1: n_tty_write+0x321/0xb60 drivers/tty/n_tty.c:2373 iterate_tty_write drivers/tty/tty_io.c:1021 [inline] file_tty_write+0x382/0x680 drivers/tty/tty_io.c:1096 tty_write+0x28/0x30 drivers/tty/tty_io.c:1117 call_write_iter include/linux/fs.h:2085 [inline] new_sync_write fs/read_write.c:497 [inline] vfs_write+0x760/0x8d0 fs/read_write.c:590 ksys_write+0xeb/0x1a0 fs/read_write.c:643 __do_sys_write fs/read_write.c:655 [inline] __se_sys_write fs/read_write.c:652 [inline] __x64_sys_write+0x42/0x50 fs/read_write.c:652 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x1d0 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b value changed: 0x00000001 -> 0x00000002 Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 11370 Comm: syz-executor.1 Not tainted 6.8.0-rc5-syzkaller-00002-gfca7526b7d89 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024 ==================================================================