drm/virtio: only destroy created contexts
authorGurchetan Singh <gurchetansingh@chromium.org>
Wed, 8 Apr 2020 23:29:38 +0000 (16:29 -0700)
committerGerd Hoffmann <kraxel@redhat.com>
Tue, 28 Apr 2020 09:22:23 +0000 (11:22 +0200)
commit45c5d2a4f39ce15fabd8e0485854b3448f1ef3b8
tree0384971a53b8be4be7859b04bd21a92d6cf9cecc
parentdbc05ae3867628abce5619bfab868a43818bdb0d
drm/virtio: only destroy created contexts

This can happen if userspace doesn't issue any 3D ioctls before
closing the DRM fd.

Fixes: 72b48ae800da ("drm/virtio: enqueue virtio_gpu_create_context after the first 3D ioctl")
Signed-off-by: Gurchetan Singh <gurchetansingh@chromium.org>
Link: http://patchwork.freedesktop.org/patch/msgid/20200408232938.55816-1-gurchetansingh@chromium.org
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
drivers/gpu/drm/virtio/virtgpu_kms.c