Skip to content

Commit 4805a1b

Browse files
committed
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
2 parents ac0f6f9 + 3119815 commit 4805a1b

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎drivers/virtio/virtio_pci.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,8 @@ static void vp_del_vqs(struct virtio_device *vdev)
473473

474474
list_for_each_entry_safe(vq, n, &vdev->vqs, list) {
475475
info = vq->priv;
476-
if (vp_dev->per_vq_vectors)
476+
if (vp_dev->per_vq_vectors &&
477+
info->msix_vector != VIRTIO_MSI_NO_VECTOR)
477478
free_irq(vp_dev->msix_entries[info->msix_vector].vector,
478479
vq);
479480
vp_del_vq(vq);

0 commit comments

Comments
 (0)