Commit 424c3f05 authored by Tomeu Vizoso's avatar Tomeu Vizoso Committed by Gerd Hoffmann

drm/virtio: Don't return invalid caps on timeout

If the wait timeouts, the caps are probably invalid and we shouldn't be
passing them to userspace.
Signed-off-by: default avatarTomeu Vizoso <tomeu.vizoso@collabora.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20171127142126.25765-1-tomeu.vizoso@collabora.comSigned-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
parent c2925bde
......@@ -518,6 +518,8 @@ static int virtio_gpu_get_caps_ioctl(struct drm_device *dev,
ret = wait_event_timeout(vgdev->resp_wq,
atomic_read(&cache_ent->is_valid), 5 * HZ);
if (!ret)
return -EBUSY;
ptr = cache_ent->caps_cache;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment