<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/gpu/drm/virtio/virtgpu_plane.c, branch v6.18.34</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.18.34</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.18.34'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2026-06-01T15:50:47+00:00</updated>
<entry>
<title>drm/virtio: use uninterruptible resv lock for plane updates</title>
<updated>2026-06-01T15:50:47+00:00</updated>
<author>
<name>Deepanshu Kartikey</name>
<email>kartikey406@gmail.com</email>
</author>
<published>2026-05-19T08:22:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8fadd01cf461fee5bb11506621339c548447e5c7'/>
<id>urn:sha1:8fadd01cf461fee5bb11506621339c548447e5c7</id>
<content type='text'>
commit 9af1b6e175c82daf4b423da339a722d8e67a735a upstream.

virtio_gpu_cursor_plane_update() and virtio_gpu_resource_flush() lock
the framebuffer BO's dma_resv via virtio_gpu_array_lock_resv() and
ignore its return value. The function can fail with -EINTR from
dma_resv_lock_interruptible() (signal during lock wait) or with
-ENOMEM from dma_resv_reserve_fences() (fence slot allocation),
leaving the resv lock not held. The queue path then walks the object
array and calls dma_resv_add_fence(), which requires the lock held;
with lockdep enabled this trips dma_resv_assert_held():

  WARNING: drivers/dma-buf/dma-resv.c:296 at dma_resv_add_fence+0x71e/0x840
  Call Trace:
   virtio_gpu_array_add_fence
   virtio_gpu_queue_ctrl_sgs
   virtio_gpu_queue_fenced_ctrl_buffer
   virtio_gpu_cursor_plane_update
   drm_atomic_helper_commit_planes
   drm_atomic_helper_commit_tail
   commit_tail
   drm_atomic_helper_commit
   drm_atomic_commit
   drm_atomic_helper_update_plane
   __setplane_atomic
   drm_mode_cursor_universal
   drm_mode_cursor_common
   drm_mode_cursor_ioctl
   drm_ioctl
   __x64_sys_ioctl

Beyond the WARN, mutating the dma_resv fence list without the lock
races with concurrent readers/writers and can corrupt the list.

Both call sites run inside the .atomic_update plane callback, which
DRM atomic helpers do not allow to fail (by the time it runs, the
commit has been signed off to userspace and there is no clean
rollback path). Moving the lock acquisition to .prepare_fb was
rejected because the broader lock scope deadlocks against other BO
locking paths in the same atomic commit.

Introduce virtio_gpu_lock_one_resv_uninterruptible() that uses
dma_resv_lock() instead of dma_resv_lock_interruptible(). This
eliminates the -EINTR failure mode -- the realistic syzbot trigger
-- without extending the lock hold across the commit. The helper
locks a single BO and rejects nents &gt; 1 with -EINVAL; both fix
sites lock exactly one BO.

Use it from virtio_gpu_cursor_plane_update() and
virtio_gpu_resource_flush(); check the return value to handle the
remaining -ENOMEM case from dma_resv_reserve_fences() by freeing
the objs and skipping the plane update for that frame. The
framebuffer BOs touched here are not shared with other contexts
and lock contention is expected to be brief, so the loss of
signal-interruptibility is acceptable.

Other callers of virtio_gpu_array_lock_resv() (the ioctl paths)
continue to use the interruptible variant.

The bug was reported by syzbot, triggered via fault injection
(fail_nth) on the DRM_IOCTL_MODE_CURSOR path, which forces the
-ENOMEM branch in dma_resv_reserve_fences().

Reported-by: syzbot+72bd3dd3a5d5f39a0271@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=72bd3dd3a5d5f39a0271
Fixes: 5cfd31c5b3a3 ("drm/virtio: fix virtio_gpu_cursor_plane_update().")
Cc: stable@vger.kernel.org
Signed-off-by: Deepanshu Kartikey &lt;kartikey406@gmail.com&gt;
Signed-off-by: Dmitry Osipenko &lt;dmitry.osipenko@collabora.com&gt;
Link: https://patch.msgid.link/20260519082247.34470-1-kartikey406@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>drm/virtio: clean up minor codestyle issues</title>
<updated>2025-08-20T10:36:45+00:00</updated>
<author>
<name>Athul Raj Kollareth</name>
<email>krathul3152@gmail.com</email>
</author>
<published>2025-08-13T06:21:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=38580d1e7f18230b10e8ba6d9a44a9fcc532f47f'/>
<id>urn:sha1:38580d1e7f18230b10e8ba6d9a44a9fcc532f47f</id>
<content type='text'>
Fix codestyle warnings and errors generated by CHECKPATCH in virtio
source files.

Signed-off-by: Athul Raj Kollareth &lt;krathul3152@gmail.com&gt;
Signed-off-by: Dmitry Osipenko &lt;dmitry.osipenko@collabora.com&gt;
Link: https://lore.kernel.org/r/20250813062109.5326-1-krathul3152@gmail.com
</content>
</entry>
<entry>
<title>drm/virtio: Support drm_panic with non-vmapped shmem BO</title>
<updated>2025-04-16T07:19:42+00:00</updated>
<author>
<name>Ryosuke Yasuoka</name>
<email>ryasuoka@redhat.com</email>
</author>
<published>2025-04-12T13:20:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2b5bd56bc14305c02fc516b573868fb9f9455573'/>
<id>urn:sha1:2b5bd56bc14305c02fc516b573868fb9f9455573</id>
<content type='text'>
Pass array of pages of the scanout buffer to shmem BO, allowing
drm_panic to work even if the BO is not vmapped.

Link: https://lore.kernel.org/all/20250407140138.162383-3-jfalempe@redhat.com/
Signed-off-by: Jocelyn Falempe &lt;jfalempe@redhat.com&gt;
Signed-off-by: Ryosuke Yasuoka &lt;ryasuoka@redhat.com&gt;
Reviewed-by: Dmitry Osipenko &lt;dmitry.osipenko@collabora.com&gt;
Tested-by: Dmitry Osipenko &lt;dmitry.osipenko@collabora.com&gt;
Signed-off-by: Dmitry Osipenko &lt;dmitry.osipenko@collabora.com&gt;
[dmitry.osipenko@collabora.com: rebased on misc-next, fixed minor checkpatch warn]
[dmitry.osipenko@collabora.com: changed commit message to use link tag]
Link: https://lore.kernel.org/all/20250412132012.291837-1-ryasuoka@redhat.com/
</content>
</entry>
<entry>
<title>drm/virtio: Test for imported buffers with drm_gem_is_imported()</title>
<updated>2025-04-16T07:05:03+00:00</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2025-04-14T13:12:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=964f2a5c0e4f8fdf533bf8a287344a1aaadd0c92'/>
<id>urn:sha1:964f2a5c0e4f8fdf533bf8a287344a1aaadd0c92</id>
<content type='text'>
Instead of testing import_attach for imported GEM buffers, invoke
drm_gem_is_imported() to do the test. The helper tests the dma_buf
itself while import_attach is just an artifact of the import. Prepares
to make import_attach optional.

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Reviewed-by: Dmitry Osipenko &lt;dmitry.osipenko@collabora.com&gt;
Signed-off-by: Dmitry Osipenko &lt;dmitry.osipenko@collabora.com&gt;
Link: https://lore.kernel.org/r/20250414131507.566072-2-tzimmermann@suse.de
</content>
</entry>
<entry>
<title>Merge drm/drm-fixes into drm-misc-fixes</title>
<updated>2025-04-08T08:15:47+00:00</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2025-04-08T08:15:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1260ed77798502de9c98020040d2995008de10cc'/>
<id>urn:sha1:1260ed77798502de9c98020040d2995008de10cc</id>
<content type='text'>
Backmerging to get updates from v6.15-rc1.

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
</content>
</entry>
<entry>
<title>drm/virtio: Fix missed dmabuf unpinning in error path of prepare_fb()</title>
<updated>2025-04-01T20:11:55+00:00</updated>
<author>
<name>Dmitry Osipenko</name>
<email>dmitry.osipenko@collabora.com</email>
</author>
<published>2025-04-01T12:38:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=395cc80051f8da267b27496a4029dd931a198855'/>
<id>urn:sha1:395cc80051f8da267b27496a4029dd931a198855</id>
<content type='text'>
Correct error handling in prepare_fb() to fix leaking resources when
error happens.

Fixes: 4a696a2ee646 ("drm/virtio: Add prepare and cleanup routines for imported dmabuf obj")
Cc: &lt;stable@vger.kernel.org&gt; # v6.14+
Acked-by: Vivek Kasireddy &lt;vivek.kasireddy@intel.com&gt;
Signed-off-by: Dmitry Osipenko &lt;dmitry.osipenko@collabora.com&gt;
Link: https://lore.kernel.org/r/20250401123842.2232205-2-dmitry.osipenko@collabora.com
</content>
</entry>
<entry>
<title>drm/virtio: Add drm_panic support</title>
<updated>2025-02-09T17:36:51+00:00</updated>
<author>
<name>Ryosuke Yasuoka</name>
<email>ryasuoka@redhat.com</email>
</author>
<published>2025-02-06T10:42:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6f3d9d0dd335290fa364048de5b3a440f1cf259f'/>
<id>urn:sha1:6f3d9d0dd335290fa364048de5b3a440f1cf259f</id>
<content type='text'>
Virtio gpu supports the drm_panic module, which displays a message to
the screen when a kernel panic occurs. It is supported where it has
vmapped shmem BO.

Signed-off-by: Jocelyn Falempe &lt;jfalempe@redhat.com&gt;
Signed-off-by: Ryosuke Yasuoka &lt;ryasuoka@redhat.com&gt;
Tested-by: Dmitry Osipenko &lt;dmitry.osipenko@collabora.com&gt;
Reviewed-by: Dmitry Osipenko &lt;dmitry.osipenko@collabora.com&gt;
Signed-off-by: Dmitry Osipenko &lt;dmitry.osipenko@collabora.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20250206104300.416014-1-ryasuoka@redhat.com
</content>
</entry>
<entry>
<title>drm/virtio: Add prepare and cleanup routines for imported dmabuf obj</title>
<updated>2024-11-26T10:28:02+00:00</updated>
<author>
<name>Vivek Kasireddy</name>
<email>vivek.kasireddy@intel.com</email>
</author>
<published>2024-11-26T03:13:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4a696a2ee646ea6f24c28b3624175a7b35482c52'/>
<id>urn:sha1:4a696a2ee646ea6f24c28b3624175a7b35482c52</id>
<content type='text'>
When an imported dmabuf obj is used as part of an atomic commit, we
need to pin it as part of prepare and unpin it during cleanup of
the associated FB, to make sure that it does not move until the
commit is completed (and also while it is being used on the Host).

Cc: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
Cc: Dmitry Osipenko &lt;dmitry.osipenko@collabora.com&gt;
Cc: Rob Clark &lt;robdclark@gmail.com&gt;
Cc: Gurchetan Singh &lt;gurchetansingh@chromium.org&gt;
Cc: Chia-I Wu &lt;olvaffe@gmail.com&gt;
Signed-off-by: Vivek Kasireddy &lt;vivek.kasireddy@intel.com&gt;
Tested-by: Dmitry Osipenko &lt;dmitry.osipenko@collabora.com&gt;
Reviewed-by: Dmitry Osipenko &lt;dmitry.osipenko@collabora.com&gt;
Signed-off-by: Dmitry Osipenko &lt;dmitry.osipenko@collabora.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20241126031643.3490496-6-vivek.kasireddy@intel.com
</content>
</entry>
<entry>
<title>drm/virtio: New fence for every plane update</title>
<updated>2024-11-18T18:18:15+00:00</updated>
<author>
<name>Dongwon Kim</name>
<email>dongwon.kim@intel.com</email>
</author>
<published>2024-10-20T23:08:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d3c55b8ab6fe5fa2e7ab02efd36d09c39ee5022f'/>
<id>urn:sha1:d3c55b8ab6fe5fa2e7ab02efd36d09c39ee5022f</id>
<content type='text'>
Having a fence linked to a virtio_gpu_framebuffer in the plane update
sequence would cause conflict when several planes referencing the same
framebuffer (e.g. Xorg screen covering multi-displays configured for an
extended mode) and those planes are updated concurrently. So it is needed
to allocate a fence for every plane state instead of the framebuffer.

Signed-off-by: Dongwon Kim &lt;dongwon.kim@intel.com&gt;
[dmitry.osipenko@collabora.com: rebase, fix up, edit commit message]
Signed-off-by: Dmitry Osipenko &lt;dmitry.osipenko@collabora.com&gt;
Acked-by: Vivek Kasireddy &lt;vivek.kasireddy@intel.com&gt;
Reviewed-by: Rob Clark &lt;robdclark@gmail.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20241020230803.247419-2-dmitry.osipenko@collabora.com
</content>
</entry>
<entry>
<title>drm/virtio: Use drm_gem_plane_helper_prepare_fb()</title>
<updated>2024-11-18T18:18:13+00:00</updated>
<author>
<name>Dongwon Kim</name>
<email>dongwon.kim@intel.com</email>
</author>
<published>2024-10-20T23:08:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=30f86b8f86ada845fbd0d853b3a3d238567ac2c2'/>
<id>urn:sha1:30f86b8f86ada845fbd0d853b3a3d238567ac2c2</id>
<content type='text'>
Use drm_gem_plane_helper_prepare_fb() helper for explicit framebuffer
synchronization. We need to wait for explicit fences in a case of
Venus and native contexts when guest user space uses explicit fencing.

Signed-off-by: Dongwon Kim &lt;dongwon.kim@intel.com&gt;
[dmitry.osipenko@collabora.com: edit commit message]
Signed-off-by: Dmitry Osipenko &lt;dmitry.osipenko@collabora.com&gt;
Acked-by: Vivek Kasireddy &lt;vivek.kasireddy@intel.com&gt;
Reviewed-by: Rob Clark &lt;robdclark@gmail.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20241020230803.247419-1-dmitry.osipenko@collabora.com
</content>
</entry>
</feed>
