OSDN Git Service

drm/virtio: fix virtio_gpu_execbuffer_ioctl locking
authorGerd Hoffmann <kraxel@redhat.com>
Tue, 11 Feb 2020 13:50:46 +0000 (14:50 +0100)
committerGerd Hoffmann <kraxel@redhat.com>
Thu, 13 Feb 2020 10:11:59 +0000 (11:11 +0100)
commitd822ccae8e60c2603391ba9cd285333163897678
treecb8a70d02e70c06542f7b113c30eec4a0c1dd169
parent0f0658636dab369f000430bc2858acbc30d9d5d9
drm/virtio: fix virtio_gpu_execbuffer_ioctl locking

Lockdep says we can't call vmemdup() while having objects reserved
because it needs the mmap semaphore.  So reorder the calls reserve
the objects later.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20200211135047.22261-2-kraxel@redhat.com
drivers/gpu/drm/virtio/virtgpu_ioctl.c