Re: [syzbot] [dri?] WARNING in drm_prime_destroy_file_private (2)

From: syzbot
Date: Thu Dec 28 2023 - 07:16:13 EST


Hello,

syzbot has tested the proposed patch but the reproducer is still triggering an issue:
WARNING in drm_prime_destroy_file_private

------------[ cut here ]------------
WARNING: CPU: 0 PID: 5524 at drivers/gpu/drm/drm_prime.c:227 drm_prime_destroy_file_private+0x43/0x60 drivers/gpu/drm/drm_prime.c:227
Modules linked in:
CPU: 0 PID: 5524 Comm: syz-executor.0 Not tainted 6.7.0-rc7-syzkaller-00016-gf5837722ffec-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023
RIP: 0010:drm_prime_destroy_file_private+0x43/0x60 drivers/gpu/drm/drm_prime.c:227
Code: 00 00 fc ff df 48 89 fa 48 c1 ea 03 80 3c 02 00 75 21 48 8b 83 90 00 00 00 48 85 c0 75 06 5b e9 63 ee 93 fc e8 5e ee 93 fc 90 <0f> 0b 90 5b e9 54 ee 93 fc e8 8f 98 ea fc eb d8 66 66 2e 0f 1f 84
RSP: 0018:ffffc900056efd90 EFLAGS: 00010293
RAX: 0000000000000000 RBX: ffff8880774dc378 RCX: ffffffff8a70d235
RDX: ffff88801d6dd940 RSI: ffffffff84f38372 RDI: ffff8880774dc408
RBP: ffff8880774dc000 R08: 0000000000000007 R09: 0000000000000002
R10: 0000000000000000 R11: 0000000000000000 R12: ffff88801ca98000
R13: ffff8880774dc2a8 R14: ffff88801ca98068 R15: ffff88801ca980a0
FS: 00005555562e1480(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000555cfd62e950 CR3: 0000000020039000 CR4: 0000000000350ef0
Call Trace:
<TASK>
drm_file_free.part.0+0x743/0xba0 drivers/gpu/drm/drm_file.c:291
drm_file_free drivers/gpu/drm/drm_file.c:247 [inline]
drm_close_helper.isra.0+0x180/0x1f0 drivers/gpu/drm/drm_file.c:308
drm_release+0x22a/0x4f0 drivers/gpu/drm/drm_file.c:495
__fput+0x270/0xb70 fs/file_table.c:394
__fput_sync+0x47/0x50 fs/file_table.c:475
__do_sys_close fs/open.c:1587 [inline]
__se_sys_close fs/open.c:1572 [inline]
__x64_sys_close+0x87/0xf0 fs/open.c:1572
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0x40/0x110 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x63/0x6b
RIP: 0033:0x7fb53da7bbda
Code: 48 3d 00 f0 ff ff 77 48 c3 0f 1f 80 00 00 00 00 48 83 ec 18 89 7c 24 0c e8 03 7f 02 00 8b 7c 24 0c 89 c2 b8 03 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 36 89 d7 89 44 24 0c e8 63 7f 02 00 8b 44 24
RSP: 002b:00007ffe292dcd60 EFLAGS: 00000293 ORIG_RAX: 0000000000000003
RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 00007fb53da7bbda
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000003
RBP: 00007fb53db9d980 R08: 0000001b2e960000 R09: 0000000000000001
R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000014229
R13: ffffffffffffffff R14: 00007fb53d600000 R15: 0000000000013ee8
</TASK>


Tested on:

commit: f5837722 Merge tag 'mm-hotfixes-stable-2023-12-27-15-0..
git tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
console output: https://syzkaller.appspot.com/x/log.txt?x=173b1a7ee80000
kernel config: https://syzkaller.appspot.com/x/.config?x=c7bcb8f62f1e2c3e
dashboard link: https://syzkaller.appspot.com/bug?extid=59dcc2e7283a6f5f5ba1
compiler: gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40
patch: https://syzkaller.appspot.com/x/patch.diff?x=17f84d09e80000