------------[ cut here ]------------ WARNING: CPU: 2 PID: 7162 at drivers/gpu/drm/drm_gem.c:286 drm_gem_object_handle_put_unlocked+0x284/0x310 drivers/gpu/drm/drm_gem.c:286 Modules linked in: CPU: 2 UID: 0 PID: 7162 Comm: syz.4.274 Not tainted 6.16.0-rc4-syzkaller-00348-g772b78c2abd8 #0 PREEMPT(full) 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_object_handle_put_unlocked+0x284/0x310 drivers/gpu/drm/drm_gem.c:286 Code: 03 0f b6 04 02 84 c0 74 0c 3c 03 7f 08 4c 89 f7 e8 21 95 ab fc c7 83 20 01 00 00 00 00 00 00 e9 b2 fe ff ff e8 7d b8 44 fc 90 <0f> 0b 90 5b 5d 41 5c 41 5d 41 5e e9 6c b8 44 fc e8 67 b8 44 fc be RSP: 0018:ffffc90003177bb0 EFLAGS: 00010283 RAX: 0000000000000ca8 RBX: ffff888105601800 RCX: ffffc90030808000 RDX: 0000000000080000 RSI: ffffffff85772e33 RDI: 0000000000000005 RBP: ffff888105601804 R08: 0000000000000005 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000001 R12: ffff8881055f8000 R13: ffff888105601808 R14: 0000000000000000 R15: 0000000000000001 FS: 00007fa00521d6c0(0000) GS:ffff8880d6918000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000110c319e15 CR3: 00000000563ea000 CR4: 0000000000352ef0 Call Trace: drm_gem_object_release_handle+0x9a/0xc0 drivers/gpu/drm/drm_gem.c:324 idr_for_each+0x143/0x270 lib/idr.c:208 drm_gem_release+0x27/0x40 drivers/gpu/drm/drm_gem.c:999 drm_file_free.part.0+0x671/0xbf0 drivers/gpu/drm/drm_file.c:249 drm_file_free drivers/gpu/drm/drm_file.c:228 [inline] drm_close_helper.isra.0+0x186/0x1f0 drivers/gpu/drm/drm_file.c:278 drm_release+0x1ab/0x360 drivers/gpu/drm/drm_file.c:426 __fput+0x3ff/0xb70 fs/file_table.c:465 task_work_run+0x14d/0x240 kernel/task_work.c:227 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] exit_to_user_mode_loop+0xeb/0x110 kernel/entry/common.c:114 exit_to_user_mode_prepare include/linux/entry-common.h:330 [inline] syscall_exit_to_user_mode_work include/linux/entry-common.h:414 [inline] syscall_exit_to_user_mode include/linux/entry-common.h:449 [inline] do_syscall_64+0x3f6/0x4c0 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fa00438e929 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:00007fa00521d038 EFLAGS: 00000246 ORIG_RAX: 00000000000001b4 RAX: 0000000000000000 RBX: 00007fa0045b5fa0 RCX: 00007fa00438e929 RDX: 0000000000000000 RSI: ffffffffffffffff RDI: 0000000000000000 RBP: 00007fa004410b39 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fa0045b5fa0 R15: 00007ffe44224eb8