Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1615454 > unrolled thread

[PATCH] virtio_pci: request irq error handling

Started by"Michael S. Tsirkin" <mst@redhat.com>
First post2017-04-03 20:10 +0200
Last post2017-04-03 20:10 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] virtio_pci: request irq error handling "Michael S. Tsirkin" <mst@redhat.com> - 2017-04-03 20:10 +0200

#1615454 — [PATCH] virtio_pci: request irq error handling

From"Michael S. Tsirkin" <mst@redhat.com>
Date2017-04-03 20:10 +0200
Subject[PATCH] virtio_pci: request irq error handling
Message-ID<tseAp-1Uo-7@gated-at.bofh.it>
On failure to request msix vectors virtio frees the vector map but fails
to reset it.  It will then attempt to use that map in vp_remove_vqs on
device removal and hybernation, resulting in memory corruption
manifesting as warnings in PCI core, hangs etc.

Reported-by: Mike Galbraith <efault@gmx.de>
Fixes: 07ec51480b5e ("virtio_pci: use shared interrupts for virtqueues")
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
 drivers/virtio/virtio_pci_common.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/virtio/virtio_pci_common.c b/drivers/virtio/virtio_pci_common.c
index 2a353ab..2b1ea9b 100644
--- a/drivers/virtio/virtio_pci_common.c
+++ b/drivers/virtio/virtio_pci_common.c
@@ -266,6 +266,7 @@ static int vp_find_vqs_msix(struct virtio_device *vdev, unsigned nvqs,
 out_remove_vqs:
 	vp_remove_vqs(vdev);
 	kfree(vp_dev->msix_vector_map);
+	vp_dev->msix_vector_map = NULL;
 out_disable_config_irq:
 	vp_dev->config_vector(vp_dev, VIRTIO_MSI_NO_VECTOR);
 out_free_config_irq:
-- 
MST

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web