dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* re: Add virtio gpu driver.
@ 2015-06-24 14:29 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2015-06-24 14:29 UTC (permalink / raw)
  To: airlied; +Cc: dri-devel

Hello Dave Airlie,

The patch dc5698e80cf7: "Add virtio gpu driver." from Sep 9, 2013,
leads to the following static checker warning:

	drivers/gpu/drm/virtio/virtgpu_vq.c:119 virtio_gpu_free_vbufs()
	warn: inconsistent returns 'spin_lock:&vgdev->free_vbufs_lock'.

drivers/gpu/drm/virtio/virtgpu_vq.c
   102  void virtio_gpu_free_vbufs(struct virtio_gpu_device *vgdev)
   103  {
   104          struct virtio_gpu_vbuffer *vbuf;
   105          int i, count = 0;
   106  
   107          count += virtqueue_get_vring_size(vgdev->ctrlq.vq);
   108          count += virtqueue_get_vring_size(vgdev->cursorq.vq);
   109  
   110          spin_lock(&vgdev->free_vbufs_lock);
   111          for (i = 0; i < count; i++) {
   112                  if (WARN_ON(list_empty(&vgdev->free_vbufs)))
   113                          return;
                                ^^^^^^^
Returning with lock held.

   114                  vbuf = list_first_entry(&vgdev->free_vbufs,
   115                                          struct virtio_gpu_vbuffer, list);
   116                  list_del(&vbuf->list);
   117          }
   118          spin_unlock(&vgdev->free_vbufs_lock);
   119          kfree(vgdev->vbufs);
   120  }

regards,
dan carpenter
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-06-24 14:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-24 14:29 Add virtio gpu driver Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox