]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
drm/virtio: Check whether transferred 2D BO is shmem
authorDmitry Osipenko <dmitry.osipenko@collabora.com>
Thu, 30 Jun 2022 20:07:19 +0000 (23:07 +0300)
committerGerd Hoffmann <kraxel@redhat.com>
Tue, 19 Jul 2022 12:40:57 +0000 (14:40 +0200)
commite473216b42aa1fd9fc6b94b608b42c210c655908
tree13b2152b869d1df2696a45dbccbf73cebee428bc
parent64b88afbd92fbf434759d1896a7cf705e1c00e79
drm/virtio: Check whether transferred 2D BO is shmem

Transferred 2D BO always must be a shmem BO. Add check for that to prevent
NULL dereference if userspace passes a VRAM BO.

Cc: stable@vger.kernel.org
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20220630200726.1884320-3-dmitry.osipenko@collabora.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
drivers/gpu/drm/virtio/virtgpu_vq.c