Oops: general protection fault, probably for non-canonical address 0xdffffc0000000001: 0000 [#1] SMP KASAN PTI KASAN: null-ptr-deref in range [0x0000000000000008-0x000000000000000f] CPU: 0 UID: 0 PID: 12543 Comm: syz.7.1196 Not tainted syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025 RIP: 0010:_compound_head include/linux/page-flags.h:284 [inline] RIP: 0010:gup_folio_range_next mm/gup.c:241 [inline] RIP: 0010:unpin_user_page_range_dirty_lock+0x63/0x4e0 mm/gup.c:369 Code: 45 31 ed 4c 89 74 24 18 4c 89 6c 24 10 49 c1 e5 06 4b 8d 1c 2e 48 83 c3 08 48 89 d8 48 c1 e8 03 48 b9 00 00 00 00 00 fc ff df <80> 3c 08 00 74 08 48 89 df e8 ff 3e 1c 00 4d 01 f5 4c 8b 23 4c 89 RSP: 0018:ffffc900033e7450 EFLAGS: 00010202 RAX: 0000000000000001 RBX: 0000000000000008 RCX: dffffc0000000000 RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000 RBP: dffffc0000000000 R08: ffffea0001300037 R09: 1ffffd4000260006 R10: dffffc0000000000 R11: fffff94000260007 R12: 0000000000000001 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 FS: 00007f4882aea6c0(0000) GS:ffff8881259f9000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f62dd393e50 CR3: 0000000078374000 CR4: 00000000003526f0 DR0: 0000000000000000 DR1: 0000000000000008 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 Call Trace: batch_unpin+0x3eb/0x560 drivers/iommu/iommufd/pages.c:691 iopt_pages_unpin_xarray drivers/iommu/iommufd/pages.c:1711 [inline] iopt_pages_unfill_xarray+0x813/0xaa0 drivers/iommu/iommufd/pages.c:1747 iopt_area_remove_access+0x2c4/0x3f0 drivers/iommu/iommufd/pages.c:2196 iommufd_access_unpin_pages+0x33b/0x4e0 drivers/iommu/iommufd/device.c:1357 iommufd_test_access_unmap+0x28c/0x300 drivers/iommu/iommufd/selftest.c:1448 iommufd_access_notify_unmap+0x192/0x320 drivers/iommu/iommufd/device.c:1314 iopt_unmap_iova_range+0x471/0x580 drivers/iommu/iommufd/io_pagetable.c:758 iopt_unmap_all+0x2b/0x50 drivers/iommu/iommufd/io_pagetable.c:820 iommufd_ioas_unmap+0x229/0x4d0 drivers/iommu/iommufd/ioas.c:358 iommufd_fops_ioctl+0x45e/0x580 drivers/iommu/iommufd/main.c:508 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:598 [inline] __se_sys_ioctl+0xf9/0x170 fs/ioctl.c:584 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0xfa0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f4881b8ebe9 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f4882aea038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f4881dc5fa0 RCX: 00007f4881b8ebe9 RDX: 0000200000000240 RSI: 0000000000003b86 RDI: 0000000000000003 RBP: 00007f4881c11e19 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f4881dc6038 R14: 00007f4881dc5fa0 R15: 00007ffcf2846718 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:_compound_head include/linux/page-flags.h:284 [inline] RIP: 0010:gup_folio_range_next mm/gup.c:241 [inline] RIP: 0010:unpin_user_page_range_dirty_lock+0x63/0x4e0 mm/gup.c:369 Code: 45 31 ed 4c 89 74 24 18 4c 89 6c 24 10 49 c1 e5 06 4b 8d 1c 2e 48 83 c3 08 48 89 d8 48 c1 e8 03 48 b9 00 00 00 00 00 fc ff df <80> 3c 08 00 74 08 48 89 df e8 ff 3e 1c 00 4d 01 f5 4c 8b 23 4c 89 RSP: 0018:ffffc900033e7450 EFLAGS: 00010202 RAX: 0000000000000001 RBX: 0000000000000008 RCX: dffffc0000000000 RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000 RBP: dffffc0000000000 R08: ffffea0001300037 R09: 1ffffd4000260006 R10: dffffc0000000000 R11: fffff94000260007 R12: 0000000000000001 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 FS: 00007f4882aea6c0(0000) GS:ffff888125af9000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00005562a78f9950 CR3: 0000000078374000 CR4: 00000000003526f0 DR0: 0000000000000000 DR1: 0000000000000008 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 ---------------- Code disassembly (best guess): 0: 45 31 ed xor %r13d,%r13d 3: 4c 89 74 24 18 mov %r14,0x18(%rsp) 8: 4c 89 6c 24 10 mov %r13,0x10(%rsp) d: 49 c1 e5 06 shl $0x6,%r13 11: 4b 8d 1c 2e lea (%r14,%r13,1),%rbx 15: 48 83 c3 08 add $0x8,%rbx 19: 48 89 d8 mov %rbx,%rax 1c: 48 c1 e8 03 shr $0x3,%rax 20: 48 b9 00 00 00 00 00 movabs $0xdffffc0000000000,%rcx 27: fc ff df * 2a: 80 3c 08 00 cmpb $0x0,(%rax,%rcx,1) <-- trapping instruction 2e: 74 08 je 0x38 30: 48 89 df mov %rbx,%rdi 33: e8 ff 3e 1c 00 call 0x1c3f37 38: 4d 01 f5 add %r14,%r13 3b: 4c 8b 23 mov (%rbx),%r12 3e: 4c rex.WR 3f: 89 .byte 0x89