================================================================== BUG: KCSAN: data-race in n_tty_close / pty_close write to 0xffff888111b609d5 of 1 bytes by task 10488 on cpu 0: pty_close+0x124/0x280 drivers/tty/pty.c:61 tty_release+0x20c/0x940 drivers/tty/tty_io.c:1760 __fput+0x2c2/0x660 fs/file_table.c:422 ____fput+0x15/0x20 fs/file_table.c:450 task_work_run+0x13a/0x1a0 kernel/task_work.c:180 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] exit_to_user_mode_loop kernel/entry/common.c:114 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0xbe/0x130 kernel/entry/common.c:218 do_syscall_64+0xd6/0x1c0 arch/x86/entry/common.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f read to 0xffff888111b609d5 of 1 bytes by task 10498 on cpu 1: n_tty_packet_mode_flush drivers/tty/n_tty.c:335 [inline] n_tty_close+0x58/0x130 drivers/tty/n_tty.c:1896 tty_ldisc_close drivers/tty/tty_ldisc.c:455 [inline] tty_ldisc_kill+0x90/0x140 drivers/tty/tty_ldisc.c:613 tty_ldisc_hangup+0x2f4/0x370 drivers/tty/tty_ldisc.c:729 __tty_hangup+0x3c6/0x540 drivers/tty/tty_io.c:630 tty_vhangup drivers/tty/tty_io.c:700 [inline] tty_ioctl+0x613/0xbe0 drivers/tty/tty_io.c:2743 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:907 [inline] __se_sys_ioctl+0xd3/0x150 fs/ioctl.c:893 __x64_sys_ioctl+0x43/0x50 fs/ioctl.c:893 x64_sys_call+0x1581/0x2d70 arch/x86/include/generated/asm/syscalls_64.h:17 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f value changed: 0x01 -> 0x00 Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 10498 Comm: syz.1.1959 Not tainted 6.10.0-rc5-syzkaller-00282-g8282d5af7be8 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024 ==================================================================