================================================================== BUG: KCSAN: data-race in n_tty_write / tty_reopen read-write to 0xffff888107316da8 of 4 bytes by task 30512 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+0x8ff/0xb00 drivers/tty/tty_io.c:2135 chrdev_open+0x323/0x3a0 fs/char_dev.c:414 do_dentry_open+0x63c/0xbe0 fs/open.c:955 vfs_open+0x4a/0x60 fs/open.c:1089 do_open fs/namei.c:3642 [inline] path_openat+0x18ba/0x1d80 fs/namei.c:3799 do_filp_open+0xf7/0x200 fs/namei.c:3826 do_sys_openat2+0xab/0x120 fs/open.c:1406 do_sys_open fs/open.c:1421 [inline] __do_sys_openat fs/open.c:1437 [inline] __se_sys_openat fs/open.c:1432 [inline] __x64_sys_openat+0xf3/0x120 fs/open.c:1432 do_syscall_64+0xd3/0x1d0 entry_SYSCALL_64_after_hwframe+0x72/0x7a read to 0xffff888107316da8 of 4 bytes by task 30509 on cpu 1: n_tty_write+0x329/0xb90 drivers/tty/n_tty.c:2373 iterate_tty_write drivers/tty/tty_io.c:1021 [inline] file_tty_write+0x386/0x690 drivers/tty/tty_io.c:1096 tty_write+0x28/0x30 drivers/tty/tty_io.c:1117 call_write_iter include/linux/fs.h:2108 [inline] new_sync_write fs/read_write.c:497 [inline] vfs_write+0x771/0x8e0 fs/read_write.c:590 ksys_write+0xeb/0x1b0 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_64+0xd3/0x1d0 entry_SYSCALL_64_after_hwframe+0x72/0x7a value changed: 0x00000001 -> 0x00000002 Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 30509 Comm: syz-executor.0 Not tainted 6.9.0-rc1-syzkaller-00274-g486291a0e624 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 ==================================================================