================================================================== BUG: KCSAN: data-race in n_tty_poll / tty_set_termios write to 0xffff88813b47c526 of 1 bytes by task 7296 on cpu 0: unset_locked_termios drivers/tty/tty_ioctl.c:257 [inline] tty_set_termios+0x3c1/0x8a0 drivers/tty/tty_ioctl.c:331 set_termios+0x375/0x3b0 drivers/tty/tty_ioctl.c:414 tty_mode_ioctl+0x573/0x670 drivers/tty/tty_ioctl.c:725 n_tty_ioctl_helper+0x8b/0x4c0 drivers/tty/tty_ioctl.c:883 n_tty_ioctl+0x102/0x200 drivers/tty/n_tty.c:2487 tty_ioctl+0xa8f/0x1120 drivers/tty/tty_io.c:2814 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:1069 [inline] __se_sys_ioctl+0xcb/0x140 fs/ioctl.c:1055 __x64_sys_ioctl+0x3f/0x50 fs/ioctl.c:1055 do_syscall_64+0x4a/0x90 arch/x86/entry/common.c:47 entry_SYSCALL_64_after_hwframe+0x44/0xae read to 0xffff88813b47c526 of 1 bytes by task 7269 on cpu 1: input_available_p drivers/tty/n_tty.c:1934 [inline] n_tty_poll+0x218/0x4a0 drivers/tty/n_tty.c:2434 tty_poll+0xa7/0x140 drivers/tty/tty_io.c:2231 vfs_poll include/linux/poll.h:90 [inline] __io_arm_poll_handler+0x195/0x460 fs/io_uring.c:5118 io_poll_add+0x68/0x510 fs/io_uring.c:5402 io_issue_sqe+0xc7c/0x6750 fs/io_uring.c:6126 __io_queue_sqe+0xe9/0x360 fs/io_uring.c:6414 io_queue_sqe fs/io_uring.c:6463 [inline] io_submit_sqe+0x1887/0x3360 fs/io_uring.c:6626 io_submit_sqes+0x5bd/0xbd0 fs/io_uring.c:6734 __do_sys_io_uring_enter fs/io_uring.c:9330 [inline] __se_sys_io_uring_enter+0x1e1/0xa80 fs/io_uring.c:9272 __x64_sys_io_uring_enter+0x74/0x80 fs/io_uring.c:9272 do_syscall_64+0x4a/0x90 arch/x86/entry/common.c:47 entry_SYSCALL_64_after_hwframe+0x44/0xae value changed: 0x00 -> 0x25 Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 7269 Comm: syz-executor.4 Not tainted 5.13.0-rc3-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 ================================================================== ------------[ cut here ]------------ WARNING: CPU: 1 PID: 7269 at fs/io_uring.c:1513 req_ref_put fs/io_uring.c:1513 [inline] WARNING: CPU: 1 PID: 7269 at fs/io_uring.c:1513 io_poll_double_wake+0x33a/0x350 fs/io_uring.c:4982 Modules linked in: CPU: 1 PID: 7269 Comm: syz-executor.4 Not tainted 5.13.0-rc3-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:req_ref_put fs/io_uring.c:1513 [inline] RIP: 0010:io_poll_double_wake+0x33a/0x350 fs/io_uring.c:4982 Code: db 75 22 e8 58 23 d6 ff b8 01 00 00 00 48 83 c4 18 5b 41 5c 41 5d 41 5e 41 5f 5d c3 e8 3f 23 d6 ff 0f 0b eb c7 e8 36 23 d6 ff <0f> 0b eb da e8 2d 23 d6 ff 0f 0b e8 26 23 d6 ff 0f 0b 0f 1f 40 00 RSP: 0018:ffffc90000dcbac8 EFLAGS: 00010083 RAX: ffffffff814d627a RBX: ffff888106c35c01 RCX: 0000000000040000 RDX: ffffc90006806000 RSI: 0000000000000063 RDI: 0000000000000064 RBP: 0000000000000080 R08: ffffffff814d624f R09: 0001888106c35c0f R10: 0001ffffffffffff R11: ffff88812dcf1000 R12: ffff888106c35c00 R13: 0000000000000000 R14: ffff888106c35c08 R15: ffff888106c35c00 FS: 00007ff45216a700(0000) GS:ffff888237d00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000055ac96340088 CR3: 000000012dd0c000 CR4: 00000000001506e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: __wake_up_common+0xbc/0x130 kernel/sched/wait.c:108 __wake_up_common_lock kernel/sched/wait.c:138 [inline] __wake_up+0x80/0xc0 kernel/sched/wait.c:157 n_tty_set_termios+0x6ff/0x7f0 drivers/tty/n_tty.c:1872 tty_set_termios+0x846/0x8a0 drivers/tty/tty_ioctl.c:341 set_termios+0x375/0x3b0 drivers/tty/tty_ioctl.c:414 tty_mode_ioctl+0x573/0x670 drivers/tty/tty_ioctl.c:725 n_tty_ioctl_helper+0x8b/0x4c0 drivers/tty/tty_ioctl.c:883 n_tty_ioctl+0x102/0x200 drivers/tty/n_tty.c:2487 tty_ioctl+0xa8f/0x1120 drivers/tty/tty_io.c:2814 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:1069 [inline] __se_sys_ioctl+0xcb/0x140 fs/ioctl.c:1055 __x64_sys_ioctl+0x3f/0x50 fs/ioctl.c:1055 do_syscall_64+0x4a/0x90 arch/x86/entry/common.c:47 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x4665d9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ff45216a188 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 000000000056bf80 RCX: 00000000004665d9 RDX: 0000000020000100 RSI: 0000000000005402 RDI: 0000000000000005 RBP: 00000000004bfcb9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf80 R13: 00007ffee977695f R14: 00007ff45216a300 R15: 0000000000022000 ---[ end trace 095eeeee4bac687d ]---