Re: [net-next RFC V5 2/5] virtio_ring: move queue_index to vring_virtqueue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 07/26/2012 04:20 PM, Paolo Bonzini wrote:
Il 05/07/2012 13:40, Sasha Levin ha scritto:
@@ -275,7 +274,7 @@ static void vm_del_vq(struct virtqueue *vq)
         vring_del_virtqueue(vq);

         /* Select and deactivate the queue */
-       writel(info->queue_index, vm_dev->base + VIRTIO_MMIO_QUEUE_SEL);
+       writel(virtqueue_get_queue_index(vq), vm_dev->base + VIRTIO_MMIO_QUEUE_SEL);
         writel(0, vm_dev->base + VIRTIO_MMIO_QUEUE_PFN);

This accesses vq after vring_del_virtqueue has freed it.

Paolo

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Yes, so need a temporary variable before vring_del_virtqueue().

Thanks.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux