------------[ cut here ]------------ pte_uffd_wp(pte) && pte_write(pte) WARNING: mm/page_table_check.c:194 at page_table_check_pte_flags mm/page_table_check.c:194 [inline], CPU#1: syz.3.2134/13616 WARNING: mm/page_table_check.c:194 at __page_table_check_ptes_set+0x233/0x4e0 mm/page_table_check.c:210, CPU#1: syz.3.2134/13616 Modules linked in: CPU: 1 UID: 0 PID: 13616 Comm: syz.3.2134 Tainted: G L syzkaller #0 PREEMPT(full) Tainted: [L]=SOFTLOCKUP Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 RIP: 0010:page_table_check_pte_flags mm/page_table_check.c:194 [inline] RIP: 0010:__page_table_check_ptes_set+0x233/0x4e0 mm/page_table_check.c:210 Code: 84 e5 fe ff ff e8 ed 90 86 ff 48 8b 2c 24 31 ff 83 e5 02 48 89 ee e8 bc 8b 86 ff 48 85 ed 0f 84 2d 02 00 00 e8 ce 90 86 ff 90 <0f> 0b 90 e9 b8 fe ff ff e8 c0 90 86 ff 48 8b 2c 24 31 ff bb 01 00 RSP: 0018:ffffc90003b0f0a0 EFLAGS: 00010283 RAX: 000000000005a413 RBX: ffff888056de0000 RCX: ffffc90035880000 RDX: 0000000000080000 RSI: ffffffff82823f32 RDI: ffff888033c924c0 RBP: 0000000000000002 R08: 0000000000000007 R09: 0000000000000000 R10: 0000000000000002 R11: 0000000000000000 R12: 0000000000000001 R13: 0000000000000001 R14: 1ffff92000761e29 R15: 1ffff92000761e16 FS: 00007fbaadc316c0(0000) GS:ffff8880d6442000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00002000005cf000 CR3: 000000002f235000 CR4: 0000000000352ef0 Call Trace: page_table_check_ptes_set include/linux/page_table_check.h:83 [inline] set_ptes+0x199/0x1d0 include/linux/pgtable.h:413 do_swap_page+0x2e58/0x6900 mm/memory.c:5055 handle_pte_fault mm/memory.c:6320 [inline] __handle_mm_fault+0x18c1/0x2b60 mm/memory.c:6455 handle_mm_fault+0x36d/0xa20 mm/memory.c:6624 faultin_page mm/gup.c:1126 [inline] __get_user_pages+0xf9c/0x34d0 mm/gup.c:1428 __get_user_pages_locked mm/gup.c:1692 [inline] __gup_longterm_locked+0x279/0x16f0 mm/gup.c:2481 gup_fast_fallback+0x18c6/0x2460 mm/gup.c:3209 pin_user_pages_fast+0xa7/0xf0 mm/gup.c:3315 io_pin_pages+0xe6/0x1e0 io_uring/memmap.c:63 io_sqe_buffer_register+0x1e8/0x2000 io_uring/rsrc.c:792 io_sqe_buffers_register.cold+0x345/0x4c2 io_uring/rsrc.c:904 __io_uring_register io_uring/register.c:739 [inline] __do_sys_io_uring_register+0x12f9/0x1ac0 io_uring/register.c:1035 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x106/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fbaacd9c799 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fbaadc31028 EFLAGS: 00000246 ORIG_RAX: 00000000000001ab RAX: ffffffffffffffda RBX: 00007fbaad015fa0 RCX: 00007fbaacd9c799 RDX: 00002000000002c0 RSI: 0000000000000000 RDI: 0000000000000008 RBP: 00007fbaace32c99 R08: 0000000000000000 R09: 0000000000000000 R10: 100000000000011a R11: 0000000000000246 R12: 0000000000000000 R13: 00007fbaad016038 R14: 00007fbaad015fa0 R15: 00007ffc3dfe6458