diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-01 09:16:21 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-01 09:16:21 -0800 |
commit | 4805a1b0e6d74feb6428c05116a2886a076ee341 (patch) | |
tree | 7390fc1dfabe79f01971c2c219b519c9b89a635b | |
parent | ac0f6f927db539e03e1f3f61bcd4ed57d5cde7a9 (diff) | |
parent | 3119815912a220bdac943dfbdfee640414c0c611 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
virtio: fix out of range array access
-rw-r--r-- | drivers/virtio/virtio_pci.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c index 1d5191fab62..1b657321699 100644 --- a/drivers/virtio/virtio_pci.c +++ b/drivers/virtio/virtio_pci.c @@ -473,7 +473,8 @@ static void vp_del_vqs(struct virtio_device *vdev) list_for_each_entry_safe(vq, n, &vdev->vqs, list) { info = vq->priv; - if (vp_dev->per_vq_vectors) + if (vp_dev->per_vq_vectors && + info->msix_vector != VIRTIO_MSI_NO_VECTOR) free_irq(vp_dev->msix_entries[info->msix_vector].vector, vq); vp_del_vq(vq); |