------------[ cut here ]------------ WARNING: CPU: 0 PID: 7285 at drivers/gpu/drm/drm_prime.c:326 drm_gem_prime_fd_to_handle+0x503/0x590 drivers/gpu/drm/drm_prime.c:326 Modules linked in: CPU: 0 UID: 0 PID: 7285 Comm: syz.2.266 Not tainted 6.14.0-rc7-syzkaller-ga1cffe8cc8ae #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 RIP: 0010:drm_gem_prime_fd_to_handle+0x503/0x590 drivers/gpu/drm/drm_prime.c:326 Code: e8 d2 d3 1a fc 90 0f 0b 90 90 e9 28 fd ff ff e8 83 a5 5a fc 4c 89 ff 41 89 dc e8 78 8a f9 05 e9 5e fe ff ff e8 6e a5 5a fc 90 <0f> 0b 90 e9 05 fd ff ff e8 10 be bd fc e9 d1 fb ff ff e8 06 be bd RSP: 0018:ffffc90004327c30 EFLAGS: 00010293 RAX: 0000000000000000 RBX: ffff8880200af000 RCX: ffffffff855f49de RDX: ffff8880518d4880 RSI: ffffffff855f4d22 RDI: ffff8880200af128 RBP: ffff88802787e800 R08: 0000000000000007 R09: fffffffffffff000 R10: ffff8880200af000 R11: 0000000000000001 R12: ffff8880309d4c00 R13: ffff88804e12f000 R14: ffffc90004327df8 R15: ffff888023ef8c58 FS: 00007ff7fa50c6c0(0000) GS:ffff88806a600000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000001b2db5ffff CR3: 000000002f220000 CR4: 0000000000352ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: drm_prime_fd_to_handle_ioctl+0xd6/0x110 drivers/gpu/drm/drm_prime.c:375 drm_ioctl_kernel+0x1e6/0x3d0 drivers/gpu/drm/drm_ioctl.c:796 drm_ioctl+0x5d6/0xc00 drivers/gpu/drm/drm_ioctl.c:893 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:906 [inline] __se_sys_ioctl fs/ioctl.c:892 [inline] __x64_sys_ioctl+0x190/0x200 fs/ioctl.c:892 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7ff7f977dff9 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:00007ff7fa50c038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007ff7f9935f80 RCX: 00007ff7f977dff9 RDX: 0000000020000180 RSI: 00000000c00c642e RDI: 0000000000000004 RBP: 00007ff7f97f0296 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007ff7f9935f80 R15: 00007ffe4ec1c7e8