All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/virtio: add null check in virtio_gpu_poll
@ 2021-11-15 17:58 Gurchetan Singh
  2021-11-15 20:04 ` Gurchetan Singh
  0 siblings, 1 reply; 2+ messages in thread
From: Gurchetan Singh @ 2021-11-15 17:58 UTC (permalink / raw)
  To: dri-devel; +Cc: kraxel

From: Gurchetan Singh <gurchetansingh@chromium.org>

If vfpriv is null, we shouldn't check vfpriv->ring_idx_mask.

Signed-off-by: Gurchetan Singh <gurchetansingh@chromium.org>
---
 drivers/gpu/drm/virtio/virtgpu_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.c b/drivers/gpu/drm/virtio/virtgpu_drv.c
index 749db18dcfa2..7975ea06b316 100644
--- a/drivers/gpu/drm/virtio/virtgpu_drv.c
+++ b/drivers/gpu/drm/virtio/virtgpu_drv.c
@@ -166,7 +166,7 @@ static __poll_t virtio_gpu_poll(struct file *filp,
 	struct drm_pending_event *e = NULL;
 	__poll_t mask = 0;
 
-	if (!vfpriv->ring_idx_mask)
+	if (!vfpriv || !vfpriv->ring_idx_mask)
 		return drm_poll(filp, wait);
 
 	poll_wait(filp, &drm_file->event_wait, wait);
-- 
2.34.0.rc1.387.gb447b232ab-goog


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] drm/virtio: add null check in virtio_gpu_poll
  2021-11-15 17:58 [PATCH] drm/virtio: add null check in virtio_gpu_poll Gurchetan Singh
@ 2021-11-15 20:04 ` Gurchetan Singh
  0 siblings, 0 replies; 2+ messages in thread
From: Gurchetan Singh @ 2021-11-15 20:04 UTC (permalink / raw)
  To: dri-devel; +Cc: kraxel

[-- Attachment #1: Type: text/plain, Size: 1204 bytes --]

On Mon, Nov 15, 2021 at 9:58 AM Gurchetan Singh <gurchetansingh@chromium.org>
wrote:

> From: Gurchetan Singh <gurchetansingh@chromium.org>
>
> If vfpriv is null, we shouldn't check vfpriv->ring_idx_mask.
>
> Signed-off-by: Gurchetan Singh <gurchetansingh@chromium.org>
> ---
>  drivers/gpu/drm/virtio/virtgpu_drv.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.c
> b/drivers/gpu/drm/virtio/virtgpu_drv.c
> index 749db18dcfa2..7975ea06b316 100644
> --- a/drivers/gpu/drm/virtio/virtgpu_drv.c
> +++ b/drivers/gpu/drm/virtio/virtgpu_drv.c
> @@ -166,7 +166,7 @@ static __poll_t virtio_gpu_poll(struct file *filp,
>         struct drm_pending_event *e = NULL;
>         __poll_t mask = 0;
>
> -       if (!vfpriv->ring_idx_mask)
> +       if (!vfpriv || !vfpriv->ring_idx_mask)
>                 return drm_poll(filp, wait);
>
>         poll_wait(filp, &drm_file->event_wait, wait);
>

Nevermind, looks like fix was merged in the main tree and will make it back
to to drm-misc-next:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d89c0c8322ecdc9a2ec84b959b6f766be082da76

-- 
> 2.34.0.rc1.387.gb447b232ab-goog
>
>

[-- Attachment #2: Type: text/html, Size: 2169 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-11-15 20:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-15 17:58 [PATCH] drm/virtio: add null check in virtio_gpu_poll Gurchetan Singh
2021-11-15 20:04 ` Gurchetan Singh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.