kernel-fxtec-pro1x/drivers/gpu/drm/virtio
David Riley 3240ebbba9 UPSTREAM: drm/virtio: Fix cache entry creation race.
virtio_gpu_cmd_get_capset would check for the existence of an entry
under lock.  If it was not found, it would unlock and call
virtio_gpu_cmd_get_capset to create a new entry.  The new entry would
be added it to the list without checking if it was added by another
task during the period where the lock was not held resulting in
duplicate entries.

Compounding this issue, virtio_gpu_cmd_capset_cb would stop iterating
after find the first matching entry.  Multiple callbacks would modify
the first entry, but any subsequent entries and their associated waiters
would eventually timeout since they don't become valid, also wasting
memory along the way.

Signed-off-by: David Riley <davidriley@chromium.org>
Link: http://patchwork.freedesktop.org/patch/msgid/20190605234423.11348-3-davidriley@chromium.org
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
(cherry picked from commit 5934ce998faf33277cc19522609577be835e80b1)
Signed-off-by: Greg Hartman <ghartman@google.com>
BUG: 139386237
Change-Id: I29e15059f0603a9723891d23ac27d44c932ef0ad
2019-08-19 11:29:57 -07:00
..
Kconfig drm: fix compilations issues introduced by "drm: allow to use mmuless SoC" 2017-01-09 11:30:30 +01:00
Makefile UPSTREAM: drm/virtio: add trace events for commands 2019-08-19 11:29:56 -07:00
virtgpu_debugfs.c UPSTREAM: drm/virtio: add virtio-gpu-features debugfs file. 2019-08-19 11:29:55 -07:00
virtgpu_display.c UPSTREAM: drm/virtio: add missing drm_atomic_helper_shutdown() call. 2019-08-19 11:29:55 -07:00
virtgpu_drm_bus.c UPSTREAM: drm/virtio: document drm_dev_set_unique workaround 2019-08-19 11:29:51 -07:00
virtgpu_drv.c UPSTREAM: drm/virtio: remove prime pin/unpin callbacks. 2019-08-19 11:29:54 -07:00
virtgpu_drv.h UPSTREAM: drm/virtio: Remove redundant return type 2019-08-19 11:29:56 -07:00
virtgpu_fb.c UPSTREAM: drm/virtio: switch to generic fbdev emulation 2019-08-19 11:29:53 -07:00
virtgpu_fence.c UPSTREAM: drm/virtio: Remove redundant return type 2019-08-19 11:29:56 -07:00
virtgpu_gem.c UPSTREAM: drm/virtio: rework resource creation workflow. 2019-08-19 11:29:55 -07:00
virtgpu_ioctl.c UPSTREAM: drm/virtio: Ensure cached capset entries are valid before copying. 2019-08-19 11:29:56 -07:00
virtgpu_kms.c UPSTREAM: drm/virtio: Add missing virtqueue reset 2019-08-19 11:29:53 -07:00
virtgpu_object.c UPSTREAM: drm/virtio: rework resource creation workflow. 2019-08-19 11:29:55 -07:00
virtgpu_plane.c UPSTREAM: drm/virtio: drop virtio_gpu_fence_cleanup() 2019-08-19 11:29:54 -07:00
virtgpu_prime.c BACKPORT: drm/virtio: implement prime export 2019-08-19 11:29:54 -07:00
virtgpu_trace.h UPSTREAM: drm/virtio: add trace events for commands 2019-08-19 11:29:56 -07:00
virtgpu_trace_points.c UPSTREAM: drm/virtio: add trace events for commands 2019-08-19 11:29:56 -07:00
virtgpu_ttm.c UPSTREAM: drm/virtio: move virtio_gpu_object_{attach, detach} calls. 2019-08-19 11:29:55 -07:00
virtgpu_vq.c UPSTREAM: drm/virtio: Fix cache entry creation race. 2019-08-19 11:29:57 -07:00