<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Nov 15, 2021 at 9:58 AM Gurchetan Singh <<a href="mailto:gurchetansingh@chromium.org" target="_blank">gurchetansingh@chromium.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">From: Gurchetan Singh <<a href="mailto:gurchetansingh@chromium.org" target="_blank">gurchetansingh@chromium.org</a>><br>
<br>
If vfpriv is null, we shouldn't check vfpriv->ring_idx_mask.<br>
<br>
Signed-off-by: Gurchetan Singh <<a href="mailto:gurchetansingh@chromium.org" target="_blank">gurchetansingh@chromium.org</a>><br>
---<br>
drivers/gpu/drm/virtio/virtgpu_drv.c | 2 +-<br>
1 file changed, 1 insertion(+), 1 deletion(-)<br>
<br>
diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.c b/drivers/gpu/drm/virtio/virtgpu_drv.c<br>
index 749db18dcfa2..7975ea06b316 100644<br>
--- a/drivers/gpu/drm/virtio/virtgpu_drv.c<br>
+++ b/drivers/gpu/drm/virtio/virtgpu_drv.c<br>
@@ -166,7 +166,7 @@ static __poll_t virtio_gpu_poll(struct file *filp,<br>
struct drm_pending_event *e = NULL;<br>
__poll_t mask = 0;<br>
<br>
- if (!vfpriv->ring_idx_mask)<br>
+ if (!vfpriv || !vfpriv->ring_idx_mask)<br>
return drm_poll(filp, wait);<br>
<br>
poll_wait(filp, &drm_file->event_wait, wait);<br></blockquote><div><br></div><div>Nevermind, looks like fix was merged in the main tree and will make it back to to drm-misc-next:</div><div><br></div><div><a href="https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d89c0c8322ecdc9a2ec84b959b6f766be082da76" rel="noreferrer" target="_blank">https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d89c0c8322ecdc9a2ec84b959b6f766be082da76</a><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
-- <br>
2.34.0.rc1.387.gb447b232ab-goog<br>
<br>
</blockquote></div></div>