------------[ cut here ]------------ WARNING: CPU: 1 PID: 8116 at drivers/iommu/iommufd/device.c:344 iommufd_hw_pagetable_detach+0x2cb/0x480 drivers/iommu/iommufd/device.c:344 Modules linked in: CPU: 1 PID: 8116 Comm: syz-executor.0 Not tainted 6.3.0-rc7-next-20230421-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: f2 fc 49 8d 7d 70 be ff ff ff ff e8 1f f6 79 05 31 ff 41 89 c5 89 c6 e8 e3 35 f2 fc 45 85 ed 0f 85 ee fd ff ff e8 b5 39 f2 fc <0f> 0b e9 e2 fd ff ff e8 a9 39 f2 fc 49 8d bd a0 00 00 00 48 b8 00 RSP: 0018:ffffc9000b1ffb30 EFLAGS: 00010293 RAX: 0000000000000000 RBX: ffff88802a324000 RCX: 0000000000000000 RDX: ffff88801fe5ba80 RSI: ffffffff8491ab9b RDI: 0000000000000005 RBP: ffff88802a3240b0 R08: 0000000000000005 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: ffff888028e24400 R13: 0000000000000000 R14: 0000000000000001 R15: ffff888028e244c0 FS: 00007f0717dc7700(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000001b32e23000 CR3: 000000002292c000 CR4: 00000000003506e0 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:0x7f071708c169 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:00007f0717dc7168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f07171abf80 RCX: 00007f071708c169 RDX: 0000000020000040 RSI: 0000000000003ba0 RDI: 0000000000000003 RBP: 00007f07170e7ca1 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffff1d7954f R14: 00007f0717dc7300 R15: 0000000000022000