================================================================== BUG: KCSAN: data-race in n_tty_close / pty_close write to 0xffff8881570195d5 of 1 bytes by task 14559 on cpu 0: pty_close+0x124/0x280 drivers/tty/pty.c:61 tty_release+0x204/0x930 drivers/tty/tty_io.c:1760 __fput+0x299/0x630 fs/file_table.c:376 ____fput+0x15/0x20 fs/file_table.c:404 task_work_run+0x135/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:108 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:201 [inline] syscall_exit_to_user_mode+0xbd/0x130 kernel/entry/common.c:212 do_syscall_64+0xda/0x1d0 arch/x86/entry/common.c:89 entry_SYSCALL_64_after_hwframe+0x63/0x6b read to 0xffff8881570195d5 of 1 bytes by task 14562 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:1886 tty_ldisc_close drivers/tty/tty_ldisc.c:455 [inline] tty_ldisc_kill+0x8d/0x130 drivers/tty/tty_ldisc.c:607 tty_ldisc_hangup+0x2e0/0x360 drivers/tty/tty_ldisc.c:723 __tty_hangup+0x3c6/0x530 drivers/tty/tty_io.c:630 tty_vhangup drivers/tty/tty_io.c:700 [inline] tty_ioctl+0x60a/0xbc0 drivers/tty/tty_io.c:2743 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:871 [inline] __se_sys_ioctl+0xcf/0x140 fs/ioctl.c:857 __x64_sys_ioctl+0x43/0x50 fs/ioctl.c:857 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: 0x01 -> 0x00 Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 14562 Comm: syz-executor.1 Not tainted 6.8.0-rc4-syzkaller-00180-g4f5e5092fdbf #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024 ==================================================================