================================================================== BUG: KCSAN: data-race in n_tty_receive_char_flow_ctrl / tty_set_termios write to 0xffff88810e26a522 of 1 bytes by task 14876 on cpu 0: unset_locked_termios drivers/tty/tty_ioctl.c:220 [inline] tty_set_termios+0x4c9/0x8b0 drivers/tty/tty_ioctl.c:340 set_termios+0x365/0x4e0 drivers/tty/tty_ioctl.c:520 tty_mode_ioctl+0x391/0x5d0 n_tty_ioctl_helper+0x8d/0x240 drivers/tty/tty_ioctl.c:986 n_tty_ioctl+0xfd/0x200 drivers/tty/n_tty.c:2511 tty_ioctl+0x886/0xbe0 drivers/tty/tty_io.c:2812 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:904 [inline] __se_sys_ioctl+0xd3/0x150 fs/ioctl.c:890 __x64_sys_ioctl+0x43/0x50 fs/ioctl.c:890 x64_sys_call+0x155d/0x2d30 arch/x86/include/generated/asm/syscalls_64.h:17 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+0x77/0x7f read to 0xffff88810e26a522 of 1 bytes by task 27 on cpu 1: n_tty_is_char_flow_ctrl drivers/tty/n_tty.c:1220 [inline] n_tty_receive_char_flow_ctrl+0x58/0x1a0 drivers/tty/n_tty.c:1241 n_tty_lookahead_flow_ctrl+0xee/0x130 drivers/tty/n_tty.c:1516 tty_port_default_lookahead_buf+0x8a/0xc0 drivers/tty/tty_port.c:59 lookahead_bufs drivers/tty/tty_buffer.c:428 [inline] flush_to_ldisc+0x31c/0x410 drivers/tty/tty_buffer.c:498 process_one_work kernel/workqueue.c:3254 [inline] process_scheduled_works+0x465/0x990 kernel/workqueue.c:3335 worker_thread+0x526/0x730 kernel/workqueue.c:3416 kthread+0x1d1/0x210 kernel/kthread.c:388 ret_from_fork+0x4b/0x60 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 value changed: 0x13 -> 0x29 Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 27 Comm: kworker/u8:1 Not tainted 6.9.0-rc5-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 Workqueue: events_unbound flush_to_ldisc ================================================================== ------------[ cut here ]------------ WARNING: CPU: 1 PID: 27 at kernel/kcov.c:860 kcov_remote_start+0x326/0x380 kernel/kcov.c:860 Modules linked in: CPU: 1 PID: 27 Comm: kworker/u8:1 Not tainted 6.9.0-rc5-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 Workqueue: nfc2_nci_cmd_wq nci_cmd_work RIP: 0010:kcov_remote_start+0x326/0x380 kernel/kcov.c:860 Code: d0 f6 28 00 4c 89 f7 e8 38 64 2a 00 e9 21 fd ff ff 0f 8d 1b fd ff ff 4c 89 f7 be 03 00 00 00 e8 c0 62 89 00 e9 09 fd ff ff 90 <0f> 0b 90 65 48 8b 05 8f 9d d2 7e 41 f7 c4 00 02 00 00 0f 84 f0 fc RSP: 0018:ffffc900000f3cf0 EFLAGS: 00010002 RAX: 0000000080000000 RBX: 0000000000000004 RCX: 0000000000000002 RDX: 000000000000024d RSI: 0000000000000004 RDI: 0000000000000004 RBP: 0000000000000004 R08: ffffffff84df9e27 R09: 0000000000000000 R10: 0001ffffffffffff R11: 0001c900000f3cd0 R12: 0000000000000246 R13: ffff888149b3fa00 R14: ffff88811ee06f00 R15: ffff888101041080 FS: 0000000000000000(0000) GS:ffff888237d00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000555576ce1818 CR3: 00000001043de000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: kcov_remote_start_common include/linux/kcov.h:48 [inline] nci_cmd_work+0x89/0x1b0 net/nfc/nci/core.c:1572 process_one_work kernel/workqueue.c:3254 [inline] process_scheduled_works+0x465/0x990 kernel/workqueue.c:3335 worker_thread+0x526/0x730 kernel/workqueue.c:3416 kthread+0x1d1/0x210 kernel/kthread.c:388 ret_from_fork+0x4b/0x60 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 ---[ end trace 0000000000000000 ]---