iommufd_mock iommufd_mock0: Adding to iommu group 0 ------------[ cut here ]------------ WARNING: CPU: 0 PID: 9213 at drivers/iommu/iommufd/device.c:344 iommufd_hw_pagetable_detach+0x2cb/0x480 drivers/iommu/iommufd/device.c:344 Modules linked in: CPU: 0 PID: 9213 Comm: syz-executor.5 Not tainted 6.3.0-next-20230425-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/14/2023 RIP: 0010:iommufd_hw_pagetable_detach+0x2cb/0x480 drivers/iommu/iommufd/device.c:344 Code: f1 fc 49 8d 7d 70 be ff ff ff ff e8 6f 3d 7a 05 31 ff 41 89 c5 89 c6 e8 23 df f1 fc 45 85 ed 0f 85 ee fd ff ff e8 f5 e2 f1 fc <0f> 0b e9 e2 fd ff ff e8 e9 e2 f1 fc 49 8d bd a0 00 00 00 48 b8 00 RSP: 0018:ffffc9000608fb30 EFLAGS: 00010212 RAX: 0000000000005914 RBX: ffff888021b34000 RCX: ffffc9000f732000 RDX: 0000000000040000 RSI: ffffffff8492436b RDI: 0000000000000005 RBP: ffff888021b340b0 R08: 0000000000000005 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: ffff888021b35a00 R13: 0000000000000000 R14: 0000000000000001 R15: ffff888021b35ac0 FS: 00007f6a4f3c5700(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000001b2d724000 CR3: 000000007c978000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: iommufd_hw_pagetable_alloc+0x646/0x800 drivers/iommu/iommufd/hw_pagetable.c:114 iommufd_device_auto_get_domain drivers/iommu/iommufd/device.c:500 [inline] iommufd_device_change_pt+0x570/0xb30 drivers/iommu/iommufd/device.c:553 iommufd_device_attach+0x27/0xd0 drivers/iommu/iommufd/device.c:591 iommufd_test_mock_domain drivers/iommu/iommufd/selftest.c:439 [inline] iommufd_test+0x81c/0x2ef0 drivers/iommu/iommufd/selftest.c:987 iommufd_fops_ioctl+0x317/0x4b0 drivers/iommu/iommufd/main.c:351 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl fs/ioctl.c:856 [inline] __x64_sys_ioctl+0x197/0x210 fs/ioctl.c:856 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f6a4e68c169 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 00 00 90 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f6a4f3c5168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f6a4e7ac050 RCX: 00007f6a4e68c169 RDX: 0000000020000040 RSI: 0000000000003ba0 RDI: 0000000000000006 RBP: 00007f6a4e6e7ca1 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffea0fa374f R14: 00007f6a4f3c5300 R15: 0000000000022000