================================================================== BUG: KCSAN: data-race in n_tty_close / pty_close write to 0xffff8881198165d5 of 1 bytes by task 4873 on cpu 0: pty_close+0x126/0x290 drivers/tty/pty.c:61 tty_release+0x1fc/0xb10 drivers/tty/tty_io.c:1754 __fput+0x29b/0x650 fs/file_table.c:465 ____fput+0x1c/0x30 fs/file_table.c:493 task_work_run+0x12e/0x1a0 kernel/task_work.c:227 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] exit_to_user_mode_loop+0xe4/0x100 kernel/entry/common.c:114 exit_to_user_mode_prepare include/linux/entry-common.h:330 [inline] syscall_exit_to_user_mode_work include/linux/entry-common.h:414 [inline] syscall_exit_to_user_mode include/linux/entry-common.h:449 [inline] do_syscall_64+0x1d6/0x200 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f read to 0xffff8881198165d5 of 1 bytes by task 4874 on cpu 1: n_tty_packet_mode_flush drivers/tty/n_tty.c:329 [inline] n_tty_close+0x54/0x120 drivers/tty/n_tty.c:1880 tty_ldisc_close drivers/tty/tty_ldisc.c:455 [inline] tty_ldisc_kill+0x8a/0x140 drivers/tty/tty_ldisc.c:613 tty_ldisc_hangup+0x2fa/0x370 drivers/tty/tty_ldisc.c:729 __tty_hangup+0x395/0x510 drivers/tty/tty_io.c:624 tty_vhangup drivers/tty/tty_io.c:694 [inline] tty_ioctl+0x601/0xb80 drivers/tty/tty_io.c:2742 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:907 [inline] __se_sys_ioctl+0xce/0x140 fs/ioctl.c:893 __x64_sys_ioctl+0x43/0x50 fs/ioctl.c:893 x64_sys_call+0x19a8/0x2fb0 arch/x86/include/generated/asm/syscalls_64.h:17 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xd2/0x200 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f value changed: 0x01 -> 0x00 Reported by Kernel Concurrency Sanitizer on: CPU: 1 UID: 0 PID: 4874 Comm: syz.1.558 Not tainted 6.15.0-syzkaller-07774-g90b83efa6701 #0 PREEMPT(voluntary) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 ==================================================================