================================================================== BUG: KCSAN: data-race in __tty_hangup / tty_hung_up_p write to 0xffff888104965928 of 8 bytes by task 5745 on cpu 1: __tty_hangup+0x1e2/0x510 drivers/tty/tty_io.c:622 tty_vhangup+0x17/0x20 drivers/tty/tty_io.c:701 pty_close+0x262/0x280 drivers/tty/pty.c:79 tty_release+0x204/0x930 drivers/tty/tty_io.c:1753 __fput+0x245/0x570 fs/file_table.c:321 ____fput+0x15/0x20 fs/file_table.c:349 task_work_run+0x135/0x1a0 kernel/task_work.c:179 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop+0xd1/0xe0 kernel/entry/common.c:171 exit_to_user_mode_prepare+0x6c/0xb0 kernel/entry/common.c:204 __syscall_exit_to_user_mode_work kernel/entry/common.c:286 [inline] syscall_exit_to_user_mode+0x26/0x140 kernel/entry/common.c:297 do_syscall_64+0x4d/0xc0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x63/0xcd read to 0xffff888104965928 of 8 bytes by task 5742 on cpu 0: tty_hung_up_p+0x20/0x40 drivers/tty/tty_io.c:746 n_tty_write+0x2dc/0xa80 drivers/tty/n_tty.c:2343 do_tty_write drivers/tty/tty_io.c:1018 [inline] file_tty_write+0x3a0/0x600 drivers/tty/tty_io.c:1089 tty_write+0x28/0x30 drivers/tty/tty_io.c:1110 call_write_iter include/linux/fs.h:1868 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x47b/0x780 fs/read_write.c:584 ksys_write+0xeb/0x1a0 fs/read_write.c:637 __do_sys_write fs/read_write.c:649 [inline] __se_sys_write fs/read_write.c:646 [inline] __x64_sys_write+0x42/0x50 fs/read_write.c:646 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 value changed: 0xffffffff84e92650 -> 0xffffffff84e924e0 Reported by Kernel Concurrency Sanitizer on: CPU: 0 PID: 5742 Comm: syz-executor.5 Not tainted 6.4.0-rc2-syzkaller-00163-g2d1bcbc6cd70 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/28/2023 ==================================================================