[syzbot] [dri?] WARNING in vkms_get_vblank_timestamp (2)

30 views
Skip to first unread message

syzbot

unread,
Jun 12, 2023, 11:40:08 PM6/12/23
to air...@gmail.com, dan...@ffwll.ch, dri-...@lists.freedesktop.org, hamoha...@gmail.com, linux-...@vger.kernel.org, melis...@gmail.com, rodrigosi...@gmail.com, syzkall...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 022ce8862dff Merge tag 'i2c-for-6.4-rc6' of git://git.kern..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=10481853280000
kernel config: https://syzkaller.appspot.com/x/.config?x=3c980bfe8b399968
dashboard link: https://syzkaller.appspot.com/bug?extid=93bd128a383695391534
compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/e269ece6e54d/disk-022ce886.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/06666cf01bd0/vmlinux-022ce886.xz
kernel image: https://storage.googleapis.com/syzbot-assets/07fc105d62a4/bzImage-022ce886.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+93bd12...@syzkaller.appspotmail.com

------------[ cut here ]------------
WARNING: CPU: 0 PID: 2682 at drivers/gpu/drm/vkms/vkms_crtc.c:103 vkms_get_vblank_timestamp+0x1cf/0x240 drivers/gpu/drm/vkms/vkms_crtc.c:103
Modules linked in:
CPU: 0 PID: 2682 Comm: syz-executor.0 Not tainted 6.4.0-rc5-syzkaller-00305-g022ce8862dff #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/25/2023
RIP: 0010:vkms_get_vblank_timestamp+0x1cf/0x240 drivers/gpu/drm/vkms/vkms_crtc.c:103
Code: 8d 70 fc e8 f3 97 60 fc 4c 89 e1 48 ba 00 00 00 00 00 fc ff df 48 c1 e9 03 80 3c 11 00 75 65 49 89 04 24 eb c4 e8 c1 8d 70 fc <0f> 0b eb bb e8 58 57 c3 fc e9 de fe ff ff e8 8e 57 c3 fc e9 78 fe
RSP: 0018:ffffc90015a47268 EFLAGS: 00010212
RAX: 0000000000003abb RBX: 000002914d969319 RCX: ffffc90003d42000
RDX: 0000000000040000 RSI: ffffffff8513b91f RDI: 0000000000000006
RBP: ffff88801e794000 R08: 0000000000000006 R09: 000002914d969319
R10: 000002914d969319 R11: 0000000000000000 R12: ffffc90015a473d0
R13: 000002914d969319 R14: 0000000000004e20 R15: ffffffff8513b750
FS: 00007f166b7c6700(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fd002c54fc0 CR3: 000000007a976000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
drm_crtc_get_last_vbltimestamp+0x102/0x1a0 drivers/gpu/drm/drm_vblank.c:877
drm_crtc_next_vblank_start+0x186/0x300 drivers/gpu/drm/drm_vblank.c:1012
set_fence_deadline drivers/gpu/drm/drm_atomic_helper.c:1537 [inline]
drm_atomic_helper_wait_for_fences+0x1f3/0x840 drivers/gpu/drm/drm_atomic_helper.c:1584
drm_atomic_helper_commit drivers/gpu/drm/drm_atomic_helper.c:2013 [inline]
drm_atomic_helper_commit+0x1bd/0x370 drivers/gpu/drm/drm_atomic_helper.c:1985
drm_atomic_commit+0x20a/0x300 drivers/gpu/drm/drm_atomic.c:1503
drm_client_modeset_commit_atomic+0x69b/0x7e0 drivers/gpu/drm/drm_client_modeset.c:1045
drm_client_modeset_commit_locked+0x149/0x580 drivers/gpu/drm/drm_client_modeset.c:1148
pan_display_atomic drivers/gpu/drm/drm_fb_helper.c:1728 [inline]
drm_fb_helper_pan_display+0x28f/0x970 drivers/gpu/drm/drm_fb_helper.c:1788
fb_pan_display+0x2fb/0x6c0 drivers/video/fbdev/core/fbmem.c:924
bit_update_start+0x49/0x1f0 drivers/video/fbdev/core/bitblit.c:390
fbcon_switch+0xbcf/0x1380 drivers/video/fbdev/core/fbcon.c:2169
redraw_screen+0x2bd/0x740 drivers/tty/vt/vt.c:970
vc_do_resize+0xee5/0x1180 drivers/tty/vt/vt.c:1292
fbcon_modechanged+0x32d/0x620 drivers/video/fbdev/core/fbcon.c:2693
fbcon_update_vcs+0x3e/0x50 drivers/video/fbdev/core/fbcon.c:2749
do_fb_ioctl+0x6e2/0x750 drivers/video/fbdev/core/fbmem.c:1127
fb_ioctl+0xeb/0x150 drivers/video/fbdev/core/fbmem.c:1204
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:0x7f166aa8c169
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:00007f166b7c6168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f166ababf80 RCX: 00007f166aa8c169
RDX: 0000000020000040 RSI: 0000000000004601 RDI: 0000000000000005
RBP: 00007f166aae7ca1 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f166accfb1f R14: 00007f166b7c6300 R15: 0000000000022000
</TASK>


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the bug is already fixed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to change bug's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the bug is a duplicate of another bug, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

syzbot

unread,
Jul 19, 2023, 3:15:55 AM7/19/23
to air...@gmail.com, dan...@ffwll.ch, dri-...@lists.freedesktop.org, hamoha...@gmail.com, linux-...@vger.kernel.org, melis...@gmail.com, rodrigosi...@gmail.com, syzkall...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: e40939bbfc68 Merge branch 'for-next/core' into for-kernelci
git tree: git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci
console output: https://syzkaller.appspot.com/x/log.txt?x=12abeba2a80000
kernel config: https://syzkaller.appspot.com/x/.config?x=c4a2640e4213bc2f
dashboard link: https://syzkaller.appspot.com/bug?extid=93bd128a383695391534
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
userspace arch: arm64
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=107c6d56a80000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/9d87aa312c0e/disk-e40939bb.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/22a11d32a8b2/vmlinux-e40939bb.xz
kernel image: https://storage.googleapis.com/syzbot-assets/0978b5788b52/Image-e40939bb.gz.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+93bd12...@syzkaller.appspotmail.com

------------[ cut here ]------------
WARNING: CPU: 1 PID: 25438 at drivers/gpu/drm/vkms/vkms_crtc.c:103 vkms_get_vblank_timestamp+0x1a4/0x1d4 drivers/gpu/drm/vkms/vkms_crtc.c:103
Modules linked in:
CPU: 1 PID: 25438 Comm: syz-executor.4 Not tainted 6.4.0-rc7-syzkaller-ge40939bbfc68 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/03/2023
pstate: 80400005 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : vkms_get_vblank_timestamp+0x1a4/0x1d4 drivers/gpu/drm/vkms/vkms_crtc.c:103
lr : vkms_get_vblank_timestamp+0x1a4/0x1d4 drivers/gpu/drm/vkms/vkms_crtc.c:103
sp : ffff800097a271f0
x29: ffff800097a271f0 x28: ffff0000c612f080 x27: 0000000000000000
x26: 1ffff00012f44e4c x25: 1ffff00012f44e70 x24: 0000000000000000
x23: ffff0000cb948000 x22: dfff800000000000 x21: 000000df48e233a8
x20: 000000df48e233a8 x19: ffff800097a27380 x18: ffff800097a27d28
x17: 0000000000000000 x16: ffff80008a395170 x15: 0000000000000000
x14: 1ffff00011bde0ac x13: 0000000000000000 x12: ffff80009a3d9000
x11: 0000000000000000 x10: 0000000000000000 x9 : 0000000000000000
x8 : ffff0000d881b780 x7 : 0000000000000000 x6 : ffff80009a3d9000
x5 : ffff0000d08378e8 x4 : ffff0000d08378a8 x3 : 0000000000000000
x2 : ffff800097a27380 x1 : 000000df48e233a8 x0 : 000000df48e233a8
Call trace:
vkms_get_vblank_timestamp+0x1a4/0x1d4 drivers/gpu/drm/vkms/vkms_crtc.c:103
drm_crtc_get_last_vbltimestamp drivers/gpu/drm/drm_vblank.c:877 [inline]
drm_crtc_next_vblank_start+0x1d4/0x3e0 drivers/gpu/drm/drm_vblank.c:1012
set_fence_deadline drivers/gpu/drm/drm_atomic_helper.c:1537 [inline]
drm_atomic_helper_wait_for_fences+0x200/0x7c4 drivers/gpu/drm/drm_atomic_helper.c:1584
drm_atomic_helper_commit+0x500/0x94c drivers/gpu/drm/drm_atomic_helper.c:2013
drm_atomic_commit+0x24c/0x2a0 drivers/gpu/drm/drm_atomic.c:1503
drm_client_modeset_commit_atomic+0x5a4/0x730 drivers/gpu/drm/drm_client_modeset.c:1045
drm_client_modeset_commit_locked+0xd0/0x4a8 drivers/gpu/drm/drm_client_modeset.c:1148
drm_client_modeset_commit+0x50/0x7c drivers/gpu/drm/drm_client_modeset.c:1174
__drm_fb_helper_restore_fbdev_mode_unlocked drivers/gpu/drm/drm_fb_helper.c:251 [inline]
drm_fb_helper_restore_fbdev_mode_unlocked drivers/gpu/drm/drm_fb_helper.c:278 [inline]
drm_fb_helper_lastclose+0xc0/0x160 drivers/gpu/drm/drm_fb_helper.c:2363
drm_fbdev_generic_client_restore+0x3c/0x50 drivers/gpu/drm/drm_fbdev_generic.c:260
drm_client_dev_restore+0x12c/0x24c drivers/gpu/drm/drm_client.c:236
drm_lastclose drivers/gpu/drm/drm_file.c:462 [inline]
drm_release+0x500/0x608 drivers/gpu/drm/drm_file.c:493
__fput+0x30c/0x7bc fs/file_table.c:321
____fput+0x20/0x30 fs/file_table.c:349
task_work_run+0x230/0x2e0 kernel/task_work.c:179
resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
do_notify_resume+0x2180/0x3c90 arch/arm64/kernel/signal.c:1305
exit_to_user_mode_prepare arch/arm64/kernel/entry-common.c:137 [inline]
exit_to_user_mode arch/arm64/kernel/entry-common.c:144 [inline]
el0_svc+0x94/0x160 arch/arm64/kernel/entry-common.c:648
el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:665
el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:591
irq event stamp: 2010
hardirqs last enabled at (2009): [<ffff80008a44626c>] __exit_to_kernel_mode arch/arm64/kernel/entry-common.c:84 [inline]
hardirqs last enabled at (2009): [<ffff80008a44626c>] exit_to_kernel_mode+0xdc/0x10c arch/arm64/kernel/entry-common.c:94
hardirqs last disabled at (2010): [<ffff80008a443db4>] el1_dbg+0x24/0x80 arch/arm64/kernel/entry-common.c:407
softirqs last enabled at (1920): [<ffff800080034380>] local_bh_enable+0x10/0x34 include/linux/bottom_half.h:32
softirqs last disabled at (1918): [<ffff80008003434c>] local_bh_disable+0x10/0x34 include/linux/bottom_half.h:19
---[ end trace 0000000000000000 ]---


---
If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.

syzbot

unread,
Feb 1, 2024, 7:13:41 PMFeb 1
to air...@gmail.com, dan...@ffwll.ch, dri-...@lists.freedesktop.org, hamoha...@gmail.com, linux-...@vger.kernel.org, maarten....@linux.intel.com, maira...@riseup.net, melis...@gmail.com, mri...@kernel.org, rodrigosi...@gmail.com, syzkall...@googlegroups.com, tzimm...@suse.de
syzbot has found a reproducer for the following issue on:

HEAD commit: 6764c317b6bb Merge tag 'scsi-fixes' of git://git.kernel.or..
git tree: upstream
console+strace: https://syzkaller.appspot.com/x/log.txt?x=12be3328180000
kernel config: https://syzkaller.appspot.com/x/.config?x=2c0ac5dfae6ecc58
dashboard link: https://syzkaller.appspot.com/bug?extid=93bd128a383695391534
compiler: gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=12067e60180000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=102774b7e80000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/90c636d7609b/disk-6764c317.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/9d76784c4adc/vmlinux-6764c317.xz
kernel image: https://storage.googleapis.com/syzbot-assets/4fa116a29660/bzImage-6764c317.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+93bd12...@syzkaller.appspotmail.com

------------[ cut here ]------------
WARNING: CPU: 1 PID: 5107 at drivers/gpu/drm/vkms/vkms_crtc.c:103 vkms_get_vblank_timestamp+0x1dc/0x250 drivers/gpu/drm/vkms/vkms_crtc.c:103
Modules linked in:
CPU: 1 PID: 5107 Comm: syz-executor297 Not tainted 6.8.0-rc2-syzkaller-00055-g6764c317b6bb #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
RIP: 0010:vkms_get_vblank_timestamp+0x1dc/0x250 drivers/gpu/drm/vkms/vkms_crtc.c:103
Code: 08 fc e8 a7 f4 f6 fb 4c 89 e1 48 ba 00 00 00 00 00 fc ff df 48 c1 e9 03 80 3c 11 00 75 67 49 89 04 24 eb c0 e8 c5 0f 08 fc 90 <0f> 0b 90 eb b5 e8 6a bf 61 fc e9 d8 fe ff ff e8 c0 bf 61 fc e9 6a
RSP: 0018:ffffc9000473f5d8 EFLAGS: 00010093
RAX: 0000000000000000 RBX: 0000001a34a6b1e9 RCX: ffffffff8584597f
RDX: ffff888023a30000 RSI: ffffffff858459fb RDI: 0000000000000006
RBP: ffff88801fab0000 R08: 0000000000000006 R09: 0000001a34a6b1e9
R10: 0000001a34a6b1e9 R11: 0000000000000004 R12: ffffc9000473f700
R13: 0000001a34a6b1e9 R14: 0000000000004e20 R15: ffffffff85845820
FS: 0000555555568380(0000) GS:ffff8880b9500000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000240 CR3: 0000000022742000 CR4: 0000000000350ef0
Call Trace:
<TASK>
drm_crtc_get_last_vbltimestamp+0x106/0x1b0 drivers/gpu/drm/drm_vblank.c:867
drm_get_last_vbltimestamp drivers/gpu/drm/drm_vblank.c:886 [inline]
drm_update_vblank_count+0x1b1/0x9d0 drivers/gpu/drm/drm_vblank.c:298
drm_crtc_accurate_vblank_count+0xc2/0x260 drivers/gpu/drm/drm_vblank.c:411
drm_crtc_arm_vblank_event+0xfb/0x2b0 drivers/gpu/drm/drm_vblank.c:1097
vkms_crtc_atomic_flush+0x10b/0x2b0 drivers/gpu/drm/vkms/vkms_crtc.c:258
drm_atomic_helper_commit_planes+0x61f/0x1000 drivers/gpu/drm/drm_atomic_helper.c:2820
vkms_atomic_commit_tail+0x5e/0x240 drivers/gpu/drm/vkms/vkms_drv.c:73
commit_tail+0x287/0x410 drivers/gpu/drm/drm_atomic_helper.c:1832
drm_atomic_helper_commit+0x2fd/0x380 drivers/gpu/drm/drm_atomic_helper.c:2072
drm_atomic_commit+0x20e/0x2e0 drivers/gpu/drm/drm_atomic.c:1514
drm_atomic_helper_set_config+0x141/0x1c0 drivers/gpu/drm/drm_atomic_helper.c:3271
drm_mode_setcrtc+0xd0a/0x1690 drivers/gpu/drm/drm_crtc.c:886
drm_ioctl_kernel+0x1ef/0x3e0 drivers/gpu/drm/drm_ioctl.c:744
drm_ioctl+0x5d8/0xc00 drivers/gpu/drm/drm_ioctl.c:841
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:871 [inline]
__se_sys_ioctl fs/ioctl.c:857 [inline]
__x64_sys_ioctl+0x196/0x220 fs/ioctl.c:857
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xd8/0x270 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x6f/0x77
RIP: 0033:0x7f0d5d4bdd89
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 71 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:00007ffe26838708 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f0d5d4bdd89
RDX: 0000000020000300 RSI: 00000000c06864a2 RDI: 0000000000000003
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000555555569610
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
</TASK>

syzbot

unread,
Feb 7, 2024, 1:17:06 PMFeb 7
to air...@gmail.com, air...@linux.ie, daniel...@ffwll.ch, daniel...@intel.com, dan...@ffwll.ch, dri-...@lists.freedesktop.org, hamoha...@gmail.com, linux-...@vger.kernel.org, maarten....@linux.intel.com, maira...@riseup.net, melis...@gmail.com, mri...@kernel.org, rodrigosi...@gmail.com, syzkall...@googlegroups.com, tzimm...@suse.de
syzbot has bisected this issue to:

commit ea40d7857d5250e5400f38c69ef9e17321e9c4a2
Author: Daniel Vetter <daniel...@ffwll.ch>
Date: Fri Oct 9 23:21:56 2020 +0000

drm/vkms: fbdev emulation support

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=1282dbffe80000
start commit: 6764c317b6bb Merge tag 'scsi-fixes' of git://git.kernel.or..
git tree: upstream
final oops: https://syzkaller.appspot.com/x/report.txt?x=1182dbffe80000
console output: https://syzkaller.appspot.com/x/log.txt?x=1682dbffe80000
Reported-by: syzbot+93bd12...@syzkaller.appspotmail.com
Fixes: ea40d7857d52 ("drm/vkms: fbdev emulation support")

For information about bisection process see: https://goo.gl/tpsmEJ#bisection

Hillf Danton

unread,
Feb 7, 2024, 7:36:32 PMFeb 7
to syzbot, linux-...@vger.kernel.org, syzkall...@googlegroups.com
On Thu, 01 Feb 2024 16:13:40 -0800
> HEAD commit: 6764c317b6bb Merge tag 'scsi-fixes' of git://git.kernel.or..
> git tree: upstream
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=102774b7e80000

#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master

--- x/drivers/gpu/drm/drm_vblank.c
+++ y/drivers/gpu/drm/drm_vblank.c
@@ -276,7 +276,7 @@ static void drm_update_vblank_count(stru
struct drm_vblank_crtc *vblank = &dev->vblank[pipe];
u32 cur_vblank, diff;
bool rc;
- ktime_t t_vblank;
+ ktime_t t_vblank = 128;
int count = DRM_TIMESTAMP_MAXRETRIES;
int framedur_ns = vblank->framedur_ns;
u32 max_vblank_count = drm_max_vblank_count(dev, pipe);
--

syzbot

unread,
Feb 7, 2024, 8:44:06 PMFeb 7
to hda...@sina.com, linux-...@vger.kernel.org, syzkall...@googlegroups.com
Hello,

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

------------[ cut here ]------------
WARNING: CPU: 1 PID: 5726 at drivers/gpu/drm/vkms/vkms_crtc.c:103 vkms_get_vblank_timestamp+0x1d2/0x210 drivers/gpu/drm/vkms/vkms_crtc.c:103
Modules linked in:
CPU: 1 PID: 5726 Comm: syz-executor.5 Not tainted 6.8.0-rc3-syzkaller-g547ab8fc4cb0-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
RIP: 0010:vkms_get_vblank_timestamp+0x1d2/0x210 drivers/gpu/drm/vkms/vkms_crtc.c:103
Code: 00 74 08 48 89 ef e8 4d ea 2a fc 48 89 5d 00 b0 01 48 83 c4 08 5b 41 5c 41 5d 41 5e 41 5f 5d e9 54 73 a5 05 e8 ef 12 c9 fb 90 <0f> 0b 90 eb e0 89 d9 80 e1 07 80 c1 03 38 c1 0f 8c 74 fe ff ff 48
RSP: 0018:ffffc900093775c0 EFLAGS: 00010093
RAX: ffffffff85ca4351 RBX: 0000001c719ce79f RCX: ffff88801ab58000
RDX: 0000000000000000 RSI: 0000001c719ce79f RDI: 0000001c719ce79f
RBP: ffffc90009377690 R08: ffffffff85ca42b9 R09: fffff5200126eec0
R10: dffffc0000000000 R11: ffffffff85ca4180 R12: 0000001c719ce79f
R13: 1ffff9200126eed2 R14: 0000000000000000 R15: ffff88801f6b8000
FS: 0000555555de6480(0000) GS:ffff8880b9500000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f8f0a405f78 CR3: 000000002da42000 CR4: 0000000000350ef0
Call Trace:
<TASK>
drm_crtc_get_last_vbltimestamp drivers/gpu/drm/drm_vblank.c:867 [inline]
drm_get_last_vbltimestamp drivers/gpu/drm/drm_vblank.c:886 [inline]
drm_update_vblank_count+0x25c/0x9c0 drivers/gpu/drm/drm_vblank.c:298
drm_vblank_disable_and_save+0xee/0x3b0 drivers/gpu/drm/drm_vblank.c:467
drm_crtc_vblank_off+0x34a/0x990 drivers/gpu/drm/drm_vblank.c:1351
disable_outputs drivers/gpu/drm/drm_atomic_helper.c:1213 [inline]
drm_atomic_helper_commit_modeset_disables+0xd01/0x1a10 drivers/gpu/drm/drm_atomic_helper.c:1417
vkms_atomic_commit_tail+0x50/0x200 drivers/gpu/drm/vkms/vkms_drv.c:71
commit_tail+0x2ab/0x3c0 drivers/gpu/drm/drm_atomic_helper.c:1832
drm_atomic_helper_commit+0x953/0x9f0 drivers/gpu/drm/drm_atomic_helper.c:2072
drm_atomic_commit+0x27f/0x2d0 drivers/gpu/drm/drm_atomic.c:1514
drm_client_modeset_commit_atomic+0x676/0x7e0 drivers/gpu/drm/drm_client_modeset.c:1051
drm_client_modeset_commit_locked+0xe0/0x520 drivers/gpu/drm/drm_client_modeset.c:1154
drm_client_modeset_commit+0x4a/0x70 drivers/gpu/drm/drm_client_modeset.c:1180
__drm_fb_helper_restore_fbdev_mode_unlocked drivers/gpu/drm/drm_fb_helper.c:251 [inline]
drm_fb_helper_restore_fbdev_mode_unlocked drivers/gpu/drm/drm_fb_helper.c:278 [inline]
drm_fb_helper_lastclose+0xbb/0x180 drivers/gpu/drm/drm_fb_helper.c:2005
drm_fbdev_generic_client_restore+0x34/0x40 drivers/gpu/drm/drm_fbdev_generic.c:258
drm_client_dev_restore+0x134/0x270 drivers/gpu/drm/drm_client.c:247
drm_lastclose drivers/gpu/drm/drm_file.c:406 [inline]
drm_release+0x47c/0x560 drivers/gpu/drm/drm_file.c:437
__fput+0x42b/0x8a0 fs/file_table.c:376
__do_sys_close fs/open.c:1554 [inline]
__se_sys_close fs/open.c:1539 [inline]
__x64_sys_close+0x7e/0x110 fs/open.c:1539
do_syscall_64+0xfb/0x240
entry_SYSCALL_64_after_hwframe+0x6f/0x77
RIP: 0033:0x7f34f067cc9a
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:00007fffaffe38c0 EFLAGS: 00000293 ORIG_RAX: 0000000000000003
RAX: ffffffffffffffda RBX: 0000000000000005 RCX: 00007f34f067cc9a
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000004
RBP: 00007f34f07ad980 R08: 0000001b2f560000 R09: 00007fffafff50b0
R10: 0000000000000000 R11: 0000000000000293 R12: 000000000001dfe8
R13: ffffffffffffffff R14: 00007f34f0200000 R15: 000000000001dca7
</TASK>


Tested on:

commit: 547ab8fc Merge tag 'loongarch-fixes-6.8-2' of git://gi..
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=11f9e618180000
kernel config: https://syzkaller.appspot.com/x/.config?x=1efaddafc96fefed
dashboard link: https://syzkaller.appspot.com/bug?extid=93bd128a383695391534
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
patch: https://syzkaller.appspot.com/x/patch.diff?x=10ddd29fe80000

Lizhi Xu

unread,
Feb 25, 2024, 9:37:21 PMFeb 25
to syzbot+93bd12...@syzkaller.appspotmail.com, syzkall...@googlegroups.com, linux-...@vger.kernel.org
#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git v6.8

diff --git a/drivers/gpu/drm/vkms/vkms_crtc.c b/drivers/gpu/drm/vkms/vkms_crtc.c
index 61e500b8c9da..ae31e000dce2 100644
--- a/drivers/gpu/drm/vkms/vkms_crtc.c
+++ b/drivers/gpu/drm/vkms/vkms_crtc.c
@@ -100,7 +100,7 @@ static bool vkms_get_vblank_timestamp(struct drm_crtc *crtc,

*vblank_time = READ_ONCE(output->vblank_hrtimer.node.expires);

- if (WARN_ON(*vblank_time == vblank->time))
+ if (WARN_ON(in_vblank_irq && *vblank_time == vblank->time))
return true;

/*

Lizhi Xu

unread,
Feb 25, 2024, 9:52:36 PMFeb 25
to syzbot+93bd12...@syzkaller.appspotmail.com, syzkall...@googlegroups.com, linux-...@vger.kernel.org
#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git v6.8

diff --git a/drivers/gpu/drm/vkms/vkms_crtc.c b/drivers/gpu/drm/vkms/vkms_crtc.c
index 61e500b8c9da..8994cbd88482 100644
--- a/drivers/gpu/drm/vkms/vkms_crtc.c
+++ b/drivers/gpu/drm/vkms/vkms_crtc.c
@@ -100,6 +100,9 @@ static bool vkms_get_vblank_timestamp(struct drm_crtc *crtc,

*vblank_time = READ_ONCE(output->vblank_hrtimer.node.expires);

+ if (!in_vblank_irq && *vblank_time == vblank->time)
+ return true;
+
if (WARN_ON(*vblank_time == vblank->time))
return true;

syzbot

unread,
Feb 25, 2024, 9:53:05 PMFeb 25
to linux-...@vger.kernel.org, lizh...@windriver.com, syzkall...@googlegroups.com
Hello,

syzbot tried to test the proposed patch but the build/boot failed:

failed to checkout kernel repo https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/v6.8: failed to run ["git" "fetch" "--force" "4d52a57a3858a6eee0d0b25cc3a0c9533f747d8f" "v6.8"]: exit status 128
fatal: couldn't find remote ref v6.8



Tested on:

commit: [unknown
git tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git v6.8
kernel config: https://syzkaller.appspot.com/x/.config?x=2c0ac5dfae6ecc58
patch: https://syzkaller.appspot.com/x/patch.diff?x=16c78602180000

syzbot

unread,
Feb 25, 2024, 9:58:06 PMFeb 25
to linux-...@vger.kernel.org, lizh...@windriver.com, syzkall...@googlegroups.com

Lizhi Xu

unread,
Feb 25, 2024, 11:02:19 PMFeb 25
to syzbot+93bd12...@syzkaller.appspotmail.com, syzkall...@googlegroups.com, linux-...@vger.kernel.org

syzbot

unread,
Feb 25, 2024, 11:34:03 PMFeb 25
to linux-...@vger.kernel.org, lizh...@windriver.com, syzkall...@googlegroups.com
Hello,

syzbot has tested the proposed patch but the reproducer is still triggering an issue:
no output from test machine



Tested on:

commit: d206a76d Linux 6.8-rc6
console output: https://syzkaller.appspot.com/x/log.txt?x=1555d602180000
kernel config: https://syzkaller.appspot.com/x/.config?x=18dc188a654638a3
dashboard link: https://syzkaller.appspot.com/bug?extid=93bd128a383695391534
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
patch: https://syzkaller.appspot.com/x/patch.diff?x=1255d602180000

Lizhi Xu

unread,
Feb 26, 2024, 2:30:09 AMFeb 26
to syzbot+93bd12...@syzkaller.appspotmail.com, syzkall...@googlegroups.com, linux-...@vger.kernel.org
#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master


diff --git a/drivers/gpu/drm/vkms/vkms_crtc.c b/drivers/gpu/drm/vkms/vkms_crtc.c
index 61e500b8c9da..45942547af44 100644
--- a/drivers/gpu/drm/vkms/vkms_crtc.c
+++ b/drivers/gpu/drm/vkms/vkms_crtc.c
@@ -20,12 +20,12 @@ static enum hrtimer_restart vkms_vblank_simulate(struct hrtimer *timer)

fence_cookie = dma_fence_begin_signalling();

+ spin_lock(&output->lock);
ret_overrun = hrtimer_forward_now(&output->vblank_hrtimer,
output->period_ns);
if (ret_overrun != 1)
pr_warn("%s: vblank timer overrun\n", __func__);

- spin_lock(&output->lock);
ret = drm_crtc_handle_vblank(crtc);
if (!ret)
DRM_ERROR("vkms failure on handling vblank");

syzbot

unread,
Feb 26, 2024, 3:33:04 AMFeb 26
to linux-...@vger.kernel.org, lizh...@windriver.com, syzkall...@googlegroups.com
Hello,

syzbot has tested the proposed patch but the reproducer is still triggering an issue:
no output from test machine



Tested on:

commit: d206a76d Linux 6.8-rc6
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=13e0b622180000
kernel config: https://syzkaller.appspot.com/x/.config?x=18dc188a654638a3
dashboard link: https://syzkaller.appspot.com/bug?extid=93bd128a383695391534
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
patch: https://syzkaller.appspot.com/x/patch.diff?x=109e4e54180000

Reply all
Reply to author
Forward
0 new messages