提交 424c3f05 编写于 作者: T Tomeu Vizoso 提交者: 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: NTomeu Vizoso <tomeu.vizoso@collabora.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20171127142126.25765-1-tomeu.vizoso@collabora.comSigned-off-by: NGerd Hoffmann <kraxel@redhat.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册